Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Commit 0ba70b7

Browse files
committed
QuickFix
1 parent 0eb6ae5 commit 0ba70b7

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/react-infinite.jsx

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ var Infinite = createReactClass({
303303
this.setState(newApertureState);
304304
}
305305

306+
if (typeof this.props.onChangeScrollState === 'function'){
307+
if (this.state.isScrolling !== prevState.isScrolling){
308+
return this.props.onChangeScrollState(this.state.isScrolling);
309+
}
310+
}
311+
306312
const isMissingVisibleRows = hasLoadedMoreChildren && !this.hasAllVisibleItems() && !this.state.isInfiniteLoading;
307313
if (isMissingVisibleRows) {
308314
this.onInfiniteLoad();
@@ -328,14 +334,6 @@ var Infinite = createReactClass({
328334
this.utils.unsubscribeFromScrollListener();
329335
},
330336

331-
componentDidUpdate(pastState){
332-
if (typeof this.props.onChangeScrollState === 'function'){
333-
if (this.state.isScrolling !== pastState.isScrolling){
334-
return this.props.onChangeScrollState(this.state.isScrolling);
335-
}
336-
}
337-
},
338-
339337
infiniteHandleScroll(e: SyntheticEvent) {
340338
if (this.utils.scrollShouldBeIgnored(e)) {
341339
return;

0 commit comments

Comments
 (0)