react-native-web
react-native-web copied to clipboard
Scrolling to index in lists uses wrong offset when content sizes has changed
The problem
Scrolling to index positions in lists (FlatList, SectionList, VirtualizedList) uses the wrong offset if the sizes of items before the wanted index have changed size.
How to reproduce
Simplified test case: https://codesandbox.io/s/practical-khorana-gfcu1z?file=/src/App.js
Steps to reproduce: Click the 3 buttons at the top of the example in order and observe the behaviour of the FlatList.
Expected behavior
ScrollToIndex (and related functions) should scroll to the correct offset even when content sizes dynamically change.
Environment (include versions). Did this work in previous versions?
- React Native for Web (version): 0.18.2
- React (version): 17.0.2
- Browser: Chrome, Safari (Doesn't seem browser related)
i have same issue