-
Notifications
You must be signed in to change notification settings - Fork 340
Description
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);
}
}}
/>