Skip to content

Sticky header appears before header items reach the top of list - FlashList v2 #1942

@phamxdinhhien

Description

@phamxdinhhien

Description

After upgrading FlashList to v2, the sticky header in my list appears before the header items are fully scrolled to the top of list. It only occurs on Flastlist v2 - it worked correctly in Flastlist v1

Expected Behavior

The sticky header should appear only after the header items reach the top of the list (as in v1).

Actual Behavior

The sticky header becomes visible too early, even while header items are still on screen.

Code Example

<FlashList
ref={listRef}
data={eventData}
renderItem={renderItem}
stickyHeaderIndices={headerIndex}
getItemType={(item) => (item.type === ITEM_TYPE.header ? 'sectionHeader' : 'row')}
contentContainerStyle={contentContainerStyle}
maintainVisibleContentPosition={{ disabled: true }}
ItemSeparatorComponent={renderItemSeparator}
onContentSizeChange={() => {
if (!isListRendered) {
setIsListRendered(true);
}
}}
/>

Simulator.Screen.Recording.-.iPhone.16.Pro.Max.-.2025-10-10.at.13.43.41.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions