Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: inverted option causing sticky headers, ListEmptyComponent to appear inverted, and causing scroll direction to be inverted on web #1487

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
fix: sticky header appears inverted when inverted is set
  • Loading branch information
mtourj committed Jan 23, 2025
commit e5364897bbfb765030588ca54b269867c1894fd3
23 changes: 15 additions & 8 deletions src/FlashList.tsx
Original file line number Diff line number Diff line change
@@ -727,14 +727,21 @@ class FlashList<T> extends React.PureComponent<
___: any
) => {
return (
<PureComponentWrapper
ref={this.stickyContentRef}
enabled={this.isStickyEnabled}
// We're passing rowData to ensure that sticky headers are updated when data changes
rowData={rowData}
arg={index}
renderer={this.rowRendererSticky}
/>
<View
style={{
flexDirection: this.props.horizontal ? "row" : "column",
...this.getTransform(),
}}
>
<PureComponentWrapper
ref={this.stickyContentRef}
enabled={this.isStickyEnabled}
// We're passing rowData to ensure that sticky headers are updated when data changes
rowData={rowData}
arg={index}
renderer={this.rowRendererSticky}
/>
</View>
);
};

Loading
Oops, something went wrong.