Skip to content

Commit

Permalink
Pass invertStickyHeaders to ScrollView
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dannycochran authored and grabbou committed Apr 3, 2018
1 parent c70578a commit 3d69b5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Libraries/Lists/VirtualizedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
onScrollEndDrag: this._onScrollEndDrag,
onMomentumScrollEnd: this._onMomentumScrollEnd,
scrollEventThrottle: this.props.scrollEventThrottle, // TODO: Android support
invertStickyHeaders: this.props.inverted,
invertStickyHeaders: this.props.invertStickyHeaders !== undefined
? this.props.invertStickyHeaders
: this.props.inverted,
stickyHeaderIndices,
};
if (inversionStyle) {
Expand Down

0 comments on commit 3d69b5c

Please sign in to comment.