Skip to content

Commit ef575d9

Browse files
authored
Merge pull request #190 from geoffreyteng/pullToRefreshThresholdBreached-bug
Fix: pullToRefreshThresholdBreached state not reset after a pull to r…
2 parents 9851460 + 4e02e1d commit ef575d9

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)