Making sense of maintainVisibleContentPosition - when loading data to start #1780
-
Hello 👋 I'm using FlashList to create an infinite, bi-directional list where data can be added to both the start and end of the list. I noticed the new Right now, when I add new data to the start, the list jumps to the very first item instead of keeping me on the item I was viewing before the update. From what I can tell, the API preserves the scroll offset at the moment new data is added, but since the list’s content shifts, the offset now points to a different item. I think if the scroll position could be adjusted by the height of the new content added at the top, it would maintain the correct visible item. Is there a recommended way to achieve this behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Do you have a valid |
Beta Was this translation helpful? Give feedback.
Do you have a valid
keyExtractor
? Also, make sure you're using v2 on new arch.