diff --git a/Libraries/Lists/VirtualizedSectionList.js b/Libraries/Lists/VirtualizedSectionList.js index aaeda79f4df5fc..83d078b1938855 100644 --- a/Libraries/Lists/VirtualizedSectionList.js +++ b/Libraries/Lists/VirtualizedSectionList.js @@ -374,6 +374,7 @@ class VirtualizedSectionList< section={info.section} trailingItem={info.trailingItem} trailingSection={info.trailingSection} + inverted={!!this.props.inverted} /> ); } @@ -435,6 +436,7 @@ type ItemWithSeparatorProps = $ReadOnly<{| onUpdateSeparator: (cellKey: string, newProps: Object) => void, prevCellKey?: ?string, renderItem: Function, + inverted: boolean, |}>; type ItemWithSeparatorState = { @@ -534,6 +536,7 @@ class ItemWithSeparator extends React.Component< item, index, section, + inverted, } = this.props; const element = this.props.renderItem({ item, @@ -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. */ - {leadingSeparator} + {!inverted ? leadingSeparator : separator} {element} - {separator} + {!inverted ? separator : leadingSeparator} ) : ( element diff --git a/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap b/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap index faa91c2e49c8a5..23e1317571b8ef 100644 --- a/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap +++ b/Libraries/Lists/__tests__/__snapshots__/VirtualizedSectionList-test.js.snap @@ -751,10 +751,10 @@ exports[`VirtualizedSectionList renders all the bells and whistles 1`] = ` } > + - + - + - + -