Skip to content

ScrollToIndex should be used in conjunction with getItemLayout or onScrollToIndexFailed #175

Open
@dieptang

Description

@dieptang

Hello,

This is nice library.
I got error as the title when changing the data source flatlist on the fly when calling to scrollToIndex.

image

React Native version:
System:
OS: macOS 13.4
CPU: (8) x64 Apple M1
Memory: 34.63 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 14.18.1 - /usr/local/bin/node
Yarn: Not Found
npm: 8.19.0 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.2 - /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8815526
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
Languages:
Java: 11.0.13 - /usr/bin/javac

Steps To Reproduce

  1. First load the screen, I give the data={images} with 5 items, 4 items, then 6 items, then it;s working fine.
  2. Then, I give it a big list of data 80 items, and calling to scrollToIndex(index: 35)
  3. Throwing an exception as the image.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions