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

Scroll position is not maintained when using sticky header #18

Open doolb14 opened 3 years ago

doolb14 commented 3 years ago

I have a list that is sectioned by date. When new items are appended at the second position because the topmost list element is a date which is the sticky header, the scroll position is not maintained. But when I remove the sticky header property it maintains list position as expected

vishalnarkhede commented 3 years ago

@doolb14 I think if I just allow modification of minIndexForVisible via prop, that should solve the issue. https://github.com/GetStream/react-native-bidirectional-infinite-scroll/blob/main/src/BidirectionalFlatList.tsx#L243

vishalnarkhede commented 3 years ago

Let me take a look this week!!

TMaszko commented 2 years ago

@doolb14 Could you share your example with the minimal reproduction repo :)?