Skip to content

Commit

Permalink
fix: item separator with inverted flashlist (#1048)
Browse files Browse the repository at this point in the history
* fix: item separator with inverted flashlist

* chore: add changelog

---------

Co-authored-by: Talha Naqvi <naqvitalha@gmail.com>
  • Loading branch information
imranbarbhuiya and naqvitalha authored Mar 15, 2024
1 parent c2b747f commit 8f0dfbe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

- Fix `ItemSeparatorComponent ` position for the `inverted` flashlist
- https://github.com/Shopify/flash-list/pull/1046
- Do not show render size unsuable warning in better layout changes
- https://github.com/Shopify/flash-list/pull/1092

Expand Down
3 changes: 2 additions & 1 deletion src/FlashList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@ class FlashList<T> extends React.PureComponent<
private getCellContainerChild = (index: number) => {
return (
<>
{this.props.inverted ? this.separator(index) : null}
<View
style={{
flexDirection:
Expand All @@ -677,7 +678,7 @@ class FlashList<T> extends React.PureComponent<
>
{this.rowRendererWithIndex(index, RenderTargetOptions.Cell)}
</View>
{this.separator(index)}
{this.props.inverted ? null : this.separator(index)}
</>
);
};
Expand Down

0 comments on commit 8f0dfbe

Please sign in to comment.