Shopify / Shopify/flash-list

[Bug] [v2] Autoscroll to bottom doesn't work when items are changing its size

Open
#1,666 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Current behavior

I have a chat interface and I want it to open on the latest message. To achieve that I'm using maintainVisibleContentPosition with the following config:

maintainVisibleContentPosition={{
  startRenderingFromBottom: true,
  autoscrollToBottomThreshold: 0.2,
}}

However, when items are changing their size, autoscroll to the bottom doesn't work.

https://github.com/user-attachments/assets/a7a0dad7-f840-42cc-89b6-6afb6a0301b1

Expected behavior

The list should keep the scroll position at the bottom, even when the size of item changes.

To Reproduce

https://github.com/jmysliv/rn-playground/tree/%40jmysliv/flash-list

Platform:

  • iOS
  • Android

Environment

2.0.0-alpha.11

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 with the fixture app at https://github.com/jmysliv/rn-playground/tree/@jmysliv/flash-list and reproduce the iOS issue using maintainVisibleContentPosition with startRenderingFromBottom and autoscrollToBottomThreshold. Trace how changing item sizes affect autoscrolling, then verify that the list remains at the bottom while item dimensions change.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.