Skip to content

Commit 3d69b5c

Browse files
dannycochrangrabbou
authored andcommitted
Pass invertStickyHeaders to ScrollView
Summary: invertStickyHeaders was being set to "this.props.inverted" -- it should just inherit from the props of VirtualizedList instead, per discussion in #18471 Fixes #18471 Pass "invertStickyHeaders: false" to a SectionList (or FlatList), and expect that your sticky headers stick to the bottom of the ScrollView, instead of the top. none [ANDROID] [BUGFIX] [SectionList] - invertStickyHeaders can now be set from SectionList or FlatList. Closes #18524 Differential Revision: D7386163 Pulled By: hramos fbshipit-source-id: 3b66dfca280e657303f69f98c5a8bc0df033f9f7
1 parent c70578a commit 3d69b5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Libraries/Lists/VirtualizedList.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -899,7 +899,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
899899
onScrollEndDrag: this._onScrollEndDrag,
900900
onMomentumScrollEnd: this._onMomentumScrollEnd,
901901
scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
902-
invertStickyHeaders: this.props.inverted,
902+
invertStickyHeaders: this.props.invertStickyHeaders !== undefined
903+
? this.props.invertStickyHeaders
904+
: this.props.inverted,
903905
stickyHeaderIndices,
904906
};
905907
if (inversionStyle) {

0 commit comments

Comments
 (0)