|
@@ -82,7 +82,7 @@ export default class AbstractPagedList extends Component<Props, State> {
|
82
|
82
|
* @inheritdoc
|
83
|
83
|
*/
|
84
|
84
|
componentDidMount() {
|
85
|
|
- this._maybeRefreshSelectedPage();
|
|
85
|
+ this._maybeRefreshSelectedPage(false);
|
86
|
86
|
}
|
87
|
87
|
|
88
|
88
|
/**
|
|
@@ -118,7 +118,7 @@ export default class AbstractPagedList extends Component<Props, State> {
|
118
|
118
|
);
|
119
|
119
|
}
|
120
|
120
|
|
121
|
|
- _maybeRefreshSelectedPage: () => void;
|
|
121
|
+ _maybeRefreshSelectedPage: ?boolean => void;
|
122
|
122
|
|
123
|
123
|
/**
|
124
|
124
|
* Components that this PagedList displays may have a refresh function to
|
|
@@ -126,9 +126,11 @@ export default class AbstractPagedList extends Component<Props, State> {
|
126
|
126
|
* function invokes this logic if it's present.
|
127
|
127
|
*
|
128
|
128
|
* @private
|
|
129
|
+ * @param {boolean} isInteractive - If true this refresh was caused by
|
|
130
|
+ * direct user interaction, false otherwise.
|
129
|
131
|
* @returns {void}
|
130
|
132
|
*/
|
131
|
|
- _maybeRefreshSelectedPage() {
|
|
133
|
+ _maybeRefreshSelectedPage(isInteractive: boolean = true) {
|
132
|
134
|
const selectedPage = this.props.pages[this.state.pageIndex];
|
133
|
135
|
let component;
|
134
|
136
|
|
|
@@ -136,7 +138,7 @@ export default class AbstractPagedList extends Component<Props, State> {
|
136
|
138
|
const { refresh } = component;
|
137
|
139
|
|
138
|
140
|
typeof refresh === 'function'
|
139
|
|
- && refresh.call(component, this.props.dispatch);
|
|
141
|
+ && refresh.call(component, this.props.dispatch, isInteractive);
|
140
|
142
|
}
|
141
|
143
|
}
|
142
|
144
|
|