Skip to content

Commit 4e02e1d

Browse files
author
Geoffrey Teng
committed
Fix: pullToRefreshThresholdBreached state not reset after a pull to refresh function call
1 parent 9851460 commit 4e02e1d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/index.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,6 @@ export default class InfiniteScroll extends Component<Props, State> {
149149
// update state when new data was sent in
150150
this.setState({
151151
showLoader: false,
152-
pullToRefreshThresholdBreached: false,
153152
});
154153
}
155154

@@ -225,6 +224,9 @@ export default class InfiniteScroll extends Component<Props, State> {
225224

226225
if (this.state.pullToRefreshThresholdBreached) {
227226
this.props.refreshFunction && this.props.refreshFunction();
227+
this.setState({
228+
pullToRefreshThresholdBreached: false,
229+
});
228230
}
229231

230232
requestAnimationFrame(() => {

0 commit comments

Comments
 (0)