mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
Fix unmount crash when using sticky headers
Reviewed By: bvaughn Differential Revision: D4659436 fbshipit-source-id: c04394681a4f07599f16bae195313e6617419404
This commit is contained in:
parent
b085215237
commit
7005f54ab5
@ -337,7 +337,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
|
||||
index={ii}
|
||||
item={item}
|
||||
key={key}
|
||||
onLayout={this._onCellLayout}
|
||||
onCellLayout={this._onCellLayout}
|
||||
onUnmount={this._onCellUnmount}
|
||||
parentProps={this.props}
|
||||
/>
|
||||
@ -689,7 +689,7 @@ class CellRenderer extends React.Component {
|
||||
cellKey: string,
|
||||
index: number,
|
||||
item: Item,
|
||||
onLayout: (event: Object, cellKey: string, index: number) => void,
|
||||
onCellLayout: (event: Object, cellKey: string, index: number) => void,
|
||||
onUnmount: (cellKey: string) => void,
|
||||
parentProps: {
|
||||
renderItem: renderItemType,
|
||||
@ -701,7 +701,7 @@ class CellRenderer extends React.Component {
|
||||
},
|
||||
};
|
||||
_onLayout = (e) => {
|
||||
this.props.onLayout(e, this.props.cellKey, this.props.index);
|
||||
this.props.onCellLayout(e, this.props.cellKey, this.props.index);
|
||||
}
|
||||
componentWillUnmount() {
|
||||
this.props.onUnmount(this.props.cellKey);
|
||||
|
Loading…
x
Reference in New Issue
Block a user