Shopify / Shopify/flash-list

autoscrollToBottom does not stay at bottom on dynamic height item updates

Open
#1,903 1 comment 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
7.2k
Forks
393
Avg merge
1d 3h
Merged PRs (30d)
1

Description

Description

When using FlashList with maintainVisibleContentPosition and startRenderingFromBottom: true, the list is expected to always start at the bottom, even when new items are added.

https://github.com/user-attachments/assets/4d5c3c7f-4ded-4fa9-937b-e730e462359e

Current behavior

If the list data updates after first render, the content does not start from the bottom.

Expected behavior

The list should always remain at the bottom, regardless of the type or speed of the data update.

Reproduction

  • Render an initial list with a few items;
  • Use an onStartReached handler that adds multiple items to the list;
  • Observe that after the update, when add new items with dynamic height, the list does not start from the bottom, even with autoscrollToBottomThreshold set.

https://github.com/user-attachments/assets/c4164c5b-3c93-43f3-a5eb-d902098fddad

Expo Snack or minimal reproduction link:
https://snack.expo.dev/@otavio_stasiak/flashlistissue
https://github.com/OtavioStasiak/FlashListTesting

Platform

  • iOS
  • Android
  • Web (if applicable)

Environment

React Native info output:
System:
  OS: macOS 15.6.1
  CPU: (14) arm64 Apple M4 Max
  Memory: 597.78 MB / 36.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.14.0
    path: ~/.nvm/versions/node/v22.14.0/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v22.14.0/bin/yarn
  npm:
    version: 10.9.2
    path: ~/.nvm/versions/node/v22.14.0/bin/npm
  Watchman: Not Found
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/otavio.stasiak/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.25659.59.2432.13423653
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.12
    path: /usr/bin/javac
  Ruby:
    version: 2.7.7
    path: /Users/otavio.stasiak/.rbenv/shims/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: Not found
  newArchEnabled: Not found
iOS:
  hermesEnabled: Not found
  newArchEnabled: Not found

FlashList version: 2.0.3

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the linked Expo Snack or minimal reproduction and observe updates using maintainVisibleContentPosition, startRenderingFromBottom, and dynamic-height items. Trace the FlashList handling for these options, then verify that updates triggered by onStartReached keep the list at the bottom across item types and update speeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.