recyclerlistview
recyclerlistview copied to clipboard
Add support for bidirectional infinite scrolling
Hi @naqvitalha 👋
Thanks for all your hard work on this repo so far! I'm exploring the possibility of integrating this repo into Expensify, and one of our requirements is an infinite bidirectional scrolling list, and I hope that we can work together to bring this desperately-needed functionality to the React Native community.
So this pull request fixes the following issues:
- https://github.com/Flipkart/recyclerlistview/issues/613
- https://github.com/Flipkart/recyclerlistview/issues/648
- A third issue on Android where
onEndReached
would not be called unless anonEndReachedThreshold
is provided.
iOS
https://user-images.githubusercontent.com/47436092/134264144-9c74f705-eb0f-4b48-bb3b-68aee8612905.mov
Web
https://user-images.githubusercontent.com/47436092/134263490-2b9621b2-4dbc-44ff-9f3d-7eed069c51f8.mov
Android
https://user-images.githubusercontent.com/47436092/134263711-2bdb8a0c-fc96-48c3-a9a0-9bdfb74fba8b.mov
@naqvitalha I've taken this out of draft and would love a review when you have some time 🙏
I'm happy to adjust the PR or answer any questions you might have. Thanks 😄
Example implementation (modified from the example created in this Youtube video series): https://github.com/roryabraham/RecyclerListViewExample
Disclaimer: I tested in react-native-web but not pure React.JS
What about merge this PR?
Why this pr was not continue? It is a cool feature.
I also need this feature. Hope to merge soon.
I don't have plans of continuing this implementation anytime soon because we ended up implementing bidirectional pagination directly in React Native's VirtualizedList.
For anyone who wants to continue with this PR, I got stuck with a bug where content would sometimes infinitely load until you reached the start of the list because maintainVisibleContentPosition
wasn't working. This same bug occurred in React Native's VirtualizedList, and we fixed it here.
The problem is explained here