GetStream / react-native-bidirectional-infinite-scroll

📜 React Native - Bidirectional Infinite Smooth Scroll
https://getstream.github.io/react-native-bidirectional-infinite-scroll/
MIT License
236 stars 27 forks source link

List jumps to the top of the List when onStartReached is called #36

Closed CrypticMindz closed 2 years ago

CrypticMindz commented 2 years ago

I'm fetching data from an API which will either be appended at the end of the List (onEndReached) or the beginning of the list (onStartReached). However when onStartReached is triggered, the list will jump to the very top, which will then again call onStartReached. It should not jump to the top of the list. Even with enableAutoscrollToTop set to false, which I know is the default value, it still jumps to the top. When I reach the end (onEndReached) everything works as expected.

CrypticMindz commented 2 years ago

For future reference: keyExtractor is the most crucial thing. If set correctly, this list works perfectly fine, so mistake on my end.

dr1verrr commented 1 year ago

In my case list jumps absolutely randomly, sometimes it works