mirror of
https://github.com/status-im/react-native.git
synced 2025-02-27 08:30:34 +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 stickyIndicesFromProps = new Set(this.props.stickyHeaderIndices);
|
||||||
const stickyHeaderIndices = [];
|
const stickyHeaderIndices = [];
|
||||||
if (ListHeaderComponent) {
|
if (ListHeaderComponent) {
|
||||||
|
if (stickyIndicesFromProps.has(0)) {
|
||||||
|
stickyHeaderIndices.push(0);
|
||||||
|
}
|
||||||
const element = React.isValidElement(ListHeaderComponent)
|
const element = React.isValidElement(ListHeaderComponent)
|
||||||
? ListHeaderComponent // $FlowFixMe
|
? ListHeaderComponent // $FlowFixMe
|
||||||
: <ListHeaderComponent />;
|
: <ListHeaderComponent />;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user