Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Libraries/Lists/VirtualizedSectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ class VirtualizedSectionList<
section={info.section}
trailingItem={info.trailingItem}
trailingSection={info.trailingSection}
inverted={!!this.props.inverted}
/>
);
}
Expand Down Expand Up @@ -435,6 +436,7 @@ type ItemWithSeparatorProps = $ReadOnly<{|
onUpdateSeparator: (cellKey: string, newProps: Object) => void,
prevCellKey?: ?string,
renderItem: Function,
inverted: boolean,
|}>;

type ItemWithSeparatorState = {
Expand Down Expand Up @@ -534,6 +536,7 @@ class ItemWithSeparator extends React.Component<
item,
index,
section,
inverted,
} = this.props;
const element = this.props.renderItem({
item,
Expand All @@ -552,9 +555,9 @@ class ItemWithSeparator extends React.Component<
* error found when Flow v0.89 was deployed. To see the error, delete
* this comment and run Flow. */
<View>
{leadingSeparator}
{!inverted ? leadingSeparator : separator}
{element}
{separator}
{!inverted ? separator : leadingSeparator}
</View>
) : (
element
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -751,10 +751,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
}
>
<View>
<separator />
<item
value="0"
/>
<separator />
</View>
</View>
<View
Expand All @@ -774,10 +774,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
}
>
<View>
<separator />
<item
value="1"
/>
<separator />
</View>
</View>
<View
Expand All @@ -797,10 +797,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
}
>
<View>
<separator />
<item
value="2"
/>
<separator />
</View>
</View>
<View
Expand All @@ -820,10 +820,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = `
}
>
<View>
<separator />
<item
value="3"
/>
<separator />
</View>
</View>
<View
Expand Down