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: ListEmptyComponent appearing inverted when inverted is set
  • Loading branch information
mtourj committed Jan 23, 2025
commit fd3f04a5e850f219320f1e579a3094b8506171c9
8 changes: 5 additions & 3 deletions src/FlashList.tsx
Original file line number Diff line number Diff line change
@@ -506,9 +506,11 @@ class FlashList<T> extends React.PureComponent<
>
{children}
</AutoLayoutView>
{this.isEmptyList
? this.getValidComponent(this.props.ListEmptyComponent)
: null}
{this.isEmptyList ? (
<View style={this.getTransform()}>
{this.getValidComponent(this.props.ListEmptyComponent)}
</View>
) : null}
<PureComponentWrapper
enabled={this.isListLoaded || children.length > 0 || this.isEmptyList}
contentStyle={this.props.contentContainerStyle}