Description
openedon Aug 4, 2022
Current behavior
When a maintainVisibleContentPosition
prop is given to a FlashList
and items are prepended to the data
array, the user sees the list content move. This can be observed in the video below. On the left tab, we have React Native's FlatList
, which does not scroll as content is prepended to its data
array. On the right tab, we have FlashList, which does scroll as content is prepended, even when providing a valid keyExtractor
and a maintainVisibleContentPosition
of { minIndexForVisible: 0 }
.
maintain-visible-content-position.mov
See https://github.com/nickcherry/flashlist-maintain-visible-content-position for reproducible demo.
Expected behavior
I would expect FlashList to behave like FlatList
and not scroll when content is prepended to its data
and maintainVisibleContentPosition
is not undefined
.
To Reproduce
https://github.com/nickcherry/flashlist-maintain-visible-content-position
Platform:
- iOS
- Android
Environment
1.2.1