How to save a position in a scrollable form when elements are loaded above the current position?

I have a cross-sectional section that contains several FlatLists in the view. When a user touches one of the elements of the bottom FlatList, some of the above FlatLists will load new data, causing the current view of the user to be displayed. In other words, the user position y remains the same, but the content that was previously reviewed now has a large y-position.

How can I keep the user's y-position in sync with the elements that they had in mind before the elements were added to the other FlatLists above?

+7
react-native react-native-flatlist
source share
1 answer

It is hard to answer without a code.

It seems that the scrollToLocation method with animated: false after changing the data should do the trick.

+2
source share

All Articles