Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scrolling to index in lists uses wrong offset when content sizes has changed #2321

Open
AndreasHogstrom opened this issue Jun 29, 2022 · 1 comment
Labels
bug: react-native Bug associated with upstream React Native vendor code project:react-native-web Issue associated with react-native-web

Comments

@AndreasHogstrom
Copy link

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)
@necolas necolas added bug: react-native Bug associated with upstream React Native vendor code project:react-native-web Issue associated with react-native-web labels Jun 29, 2022
@huuanhopp
Copy link

i have same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: react-native Bug associated with upstream React Native vendor code project:react-native-web Issue associated with react-native-web
Projects
None yet
Development

No branches or pull requests

3 participants