You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to change an icon in a sticky header when the list has scrolled past a certain point.
For that, I pass a prop in extraData: { iconColor: "red" / "green" }
When I don't use stickyHeaderIndices, it works (the icon turns from red to green when passing the 150px scrollY threshold):
But if I console.log in the header render function, I see the right value! It just does not render!
Here is an extract of the relevant code:
<FlashList<ListItem>data={items}getItemType={getItemType}keyExtractor={keyIdExtractor}renderItem={handleRenderItem}overrideItemLayout={handleOverrideItemLayout}stickyHeaderIndices={headerIndices}onScroll={handleScroll}extraData={extraData}estimatedListSize={WindowDimensions}// and more unrelated props/>
Expected behavior
The icon color in the sticky should change when extraData changes.
To Reproduce
Platform:
iOS
Android (haven't tested yet)
Environment
1.6.4
The text was updated successfully, but these errors were encountered:
I'm also facing this issue. Just tried the patch from elliottkember, but this is not fixing it for me unfortunately.
I'll have to admit my usecase is a bit complex, as I'm using FLASHlists rendered in a (horizontal paging) FLATlist.
Current behavior
I want to change an icon in a sticky header when the list has scrolled past a certain point.
For that, I pass a prop in
extraData
:{ iconColor: "red" / "green" }
When I don't use
stickyHeaderIndices
, it works (the icon turns from red to green when passing the 150px scrollY threshold):Simulator.Screen.Recording.-.iPhone.15.-.2024-04-12.at.00.37.07.mp4
But when using
stickyHeaderIndices
, the header is not re-rendered (unless the target changes):Simulator.Screen.Recording.-.iPhone.15.-.2024-04-12.at.00.40.16.mp4
But if I console.log in the header render function, I see the right value! It just does not render!
Here is an extract of the relevant code:
Expected behavior
The icon color in the sticky should change when
extraData
changes.To Reproduce
Platform:
Environment
1.6.4
The text was updated successfully, but these errors were encountered: