Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ export default class InfiniteScroll extends Component<Props, State> {
: document.documentElement.scrollTop
? document.documentElement
: document.body;

// to fix Pull to Refresh is disabled when hasMore is flipped to false
this.lastScrollTop = target.scrollTop;
// return immediately if the action has already been triggered,
// prevents multiple triggers.
if (this.actionTriggered) return;
Expand All @@ -323,8 +324,6 @@ export default class InfiniteScroll extends Component<Props, State> {
this.setState({ showLoader: true });
this.props.next && this.props.next();
}

this.lastScrollTop = target.scrollTop;
};

render() {
Expand Down