recyclerlistview icon indicating copy to clipboard operation
recyclerlistview copied to clipboard

Add support for bidirectional infinite scrolling

Open roryabraham opened this issue 3 years ago • 4 comments

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:

  1. https://github.com/Flipkart/recyclerlistview/issues/613
  2. https://github.com/Flipkart/recyclerlistview/issues/648
  3. A third issue on Android where onEndReached would not be called unless an onEndReachedThreshold 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

roryabraham avatar Sep 15 '21 08:09 roryabraham

@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

roryabraham avatar Oct 08 '21 22:10 roryabraham

Disclaimer: I tested in react-native-web but not pure React.JS

roryabraham avatar Oct 08 '21 22:10 roryabraham

What about merge this PR?

eseQ avatar Feb 03 '22 14:02 eseQ

Why this pr was not continue? It is a cool feature.

zhangwen9229 avatar Jul 28 '22 08:07 zhangwen9229

I also need this feature. Hope to merge soon.

chenxianj avatar Sep 26 '22 07:09 chenxianj

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

roryabraham avatar Sep 26 '22 22:09 roryabraham