expo / react-native-infinite-scroll-view

An infinitely scrolling view that notifies you as the scroll offset approaches the bottom
MIT License
519 stars 57 forks source link

Support infinite scroll in both directions #34

Open ExplodingCabbage opened 7 years ago

ExplodingCabbage commented 7 years ago

Currently this component only allows infinite downward (or rightward) scroll. However, some use cases require infinite scroll in both directions. (For instance, a chat app with a search feature that lets you jump to an old message via the search feature and then scroll either forwards or backwards in time from that point.)

ide commented 7 years ago

Interesting use case, it's not something I see us working on soon but I think it's doable.

brianinator commented 7 years ago

What about using onChangeVisibleRows and detect based on visibleRows with sectionID and rowID? You can then know the direction the user is going. What you think @ide?

brianinator commented 7 years ago

On second thought, it might get dirty if the search allows user to jumps to chat message. Also, row in question is visible multiple times.

ambarc commented 7 years ago

@ide what would the build path for supporting that look like? I'm looking at using this component composed with the InvertibleScrollView to get the chat experience we're talking about.

shamimshahcheraghi commented 6 years ago

@ExplodingCabbage did you find any solution for infinite scroll in both directions?