Reputation: 907
I have a react-native SectionList that contains multiple FlatLists in the view. When a user touches one of the elements in the bottom FlatList, some of the FlatLists above will load new data causing the user's current view to seem be pushed up. In other words, the user's y-position remains the same but the content that was previously in view now has a greater y-position.
How can I keep the user's y-position in sync with the elements they had in view before the elements in the other FlatLists above were added?
Upvotes: 8
Views: 1585
Reputation: 3717
It is hard to answer without any code example.
Seems scrollToLocation
method with animated: false
after data was changed should do the trick.
Upvotes: 4