Skip to content

Commit dd479a9

Browse files
dannycochranfacebook-github-bot
authored andcommittedMar 23, 2018
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 cbb7c7c commit dd479a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎Libraries/Lists/VirtualizedList.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
893893
onScrollEndDrag: this._onScrollEndDrag,
894894
onMomentumScrollEnd: this._onMomentumScrollEnd,
895895
scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
896-
invertStickyHeaders: this.props.inverted,
896+
invertStickyHeaders: this.props.invertStickyHeaders !== undefined
897+
? this.props.invertStickyHeaders
898+
: this.props.inverted,
897899
stickyHeaderIndices,
898900
};
899901
if (inversionStyle) {

0 commit comments

Comments
 (0)