mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 00:20:31 +00:00
Support sticky ListHeaderComponent
Summary: Fixed the little oversight. Reviewed By: TheSavior Differential Revision: D5743857 fbshipit-source-id: c61a6c29b5f547f3e5a2b7ff2d318f693cc9aed5
This commit is contained in:
parent
91c52af083
commit
57c7324ab7
@ -565,6 +565,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
||||
const stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
|
||||
const stickyHeaderIndices = [];
|
||||
if (ListHeaderComponent) {
|
||||
if (stickyIndicesFromProps.has(0)) {
|
||||
stickyHeaderIndices.push(0);
|
||||
}
|
||||
const element = React.isValidElement(ListHeaderComponent)
|
||||
? ListHeaderComponent // $FlowFixMe
|
||||
: <ListHeaderComponent />;
|
||||
|
Loading…
x
Reference in New Issue
Block a user