#2050·flash-list

FlashList 2.x: 当初始数据未填满屏幕时, maintainVisibleContentPosition 会出现问题

作者: ACHP创建于 2025年12月30日更新于 2026年8月21日
标签bugP1

Description

When we initialize the flashlist data with only one item, maintainVisibleScrollPosition and startRenderingFromBottom make the list "jump" when adding more items on top. (see video)

Current behavior

In the following video you can see I initialize the chat with only one item, then I click "add more on top" to add more old messages. During the first render, the initial message appears correctly at the end of the list, but during the second render, it jump to the top/middle of the screen. When manually scrolling, everything goes back to normal.

内容来源: Shopify/flash-list