[FlatList] scrollToIndex doesn't scroll right after render #25176
Labels
Bug
Component: FlatList
Stale
There has been a lack of activity on this issue and it may be closed soon.
Right after render
FlatList
with array of several items indata
, i load another several items and prepend they to the top of the array, then i callscrollToIndex
for scrolling to last scroll position. And FlatList ignores that call. But it works with setTimeout.React Native version:
System:
OS: macOS 10.14.5
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 1.60 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 11.9.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
IDEs:
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz => 0.59.8
npmGlobalPackages:
react-native-cli: 2.0.1
I expected that FlatList being scrolled without setTimeout.
Snack:
https://snack.expo.io/@center-777/flatlist
I logging events right in page content because in console they are not displayed in turn.
The text was updated successfully, but these errors were encountered: