Skip to content

Conversation

KimSeongIl
Copy link

'react-infinite-scroll' is a good component.
But I think there is an issue.

Call the detachScrollListener function only when 'offset' is less than 'threshold' in the scrollListener function.
So when 'hasMore' changes, the detachScrollListener function is not called.
That's why I think the function detachScrollListener should be called in the componentDidUpdate function as well.

@PierreGUI
Copy link

Relates to issue #44
The fix here works but isn't enough. You shouldn't detach/attach event listener for every update, but only after a change of hasMore.
See dantzchan@506138f (from issue discussion).
Cheers

PierreGUI added a commit to PierreGUI/react-infinite-scroller that referenced this pull request Mar 8, 2018
PierreGUI added a commit to PierreGUI/react-infinite-scroller that referenced this pull request Mar 8, 2018
@KimSeongIl
Copy link
Author

Ok. Thanks for the reply.

@KimSeongIl KimSeongIl closed this Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants