V2: scrollToIndex with viewPosition becomes unreliable when approaching end of list
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.2k
- Forks
- 393
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Description
Description
In FlashList v2, the scrollToIndex with viewPosition method becomes unreliable when scrolling towards the end of a list. The scroll behavior that works perfectly for the first ~90% of items suddenly stops showing at the position requested for the remaining items. viewPosition is ignored for last items in the list.
✅ scrollToIndex was working well on V1 for all index in the list.
Expected behavior
scrollToIndex with viewPosition should consistently scroll to the target item regardless of its position in the list.
Actual Behavior
✅ Works correctly for items in the first ~90% of the list
❌ Becomes inconsistent/unreliable for items in the last ~10% of the list
❌ Increasing bottom space to allow the scrolling doesn't resolve the issue
❌ The scroll simply stops working as expected
❌ Disabling maintainVisibleContentPosition is not helping
Reproduction
1- Create a FlashList
2-Use scrollToIndex with viewPosition to scroll to items
3-Observe that scrolling works fine for items with index < 16 (in a 23-item list)
4-Try scrolling to items with index > 16 - the scroll behavior becomes inconsistent, the position wanted is not respected.
Platform
- iOS
- Android
- Web (if applicable)
Environment
React Native info output:
System:
OS: macOS 26.0
CPU: (10) arm64 Apple M1 Max
Memory: 222.17 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.19.0
path: ~/.nvm/versions/node/v22.19.0/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 11.6.0
path: ~/.nvm/versions/node/v22.19.0/bin/npm
Watchman:
version: 2025.05.19.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.16.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 25.0
- iOS 26.0
- macOS 26.0
- tvOS 26.0
- visionOS 26.0
- watchOS 26.0
Android SDK: Not Found
IDEs:
Android Studio: 2024.2 AI-242.23339.11.2421.12550806
Xcode:
version: 26.0.1/17A400
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.5
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 20.0.2
wanted: latest
react:
installed: 19.1.0
wanted: 19.1.0
react-native:
installed: 0.81.4
wanted: 0.81.4
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
FlashList version:
Additional context
Checklist
- I've searched existing issues and couldn't find a duplicate
- I've provided a minimal reproduction (Expo Snack preferred)
- I'm using the latest version of @shopify/flash-list
- I've included all required information above
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with a FlashList and scrollToIndex with viewPosition, comparing indices below 16 with indices above 16 in a 23-item list on iOS and Android. No source file, test, or minimal reproduction is identified in the report; done means viewPosition is consistently respected for items near the end of the list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100