mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 22:28:09 +00:00
Remove MetroListView from SectionList
Reviewed By: yungsters Differential Revision: D10251054 fbshipit-source-id: dc801817dfcf2722e4625178117006ab51e57255
This commit is contained in:
parent
636d01bbd0
commit
4a5221884f
@ -9,7 +9,6 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const MetroListView = require('MetroListView');
|
||||
const Platform = require('Platform');
|
||||
const React = require('React');
|
||||
const ScrollView = require('ScrollView');
|
||||
@ -277,7 +276,9 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
|
||||
viewOffset?: number,
|
||||
viewPosition?: number,
|
||||
}) {
|
||||
this._wrapperListRef.scrollToLocation(params);
|
||||
if (this._wrapperListRef != null) {
|
||||
this._wrapperListRef.scrollToLocation(params);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -326,18 +327,14 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
|
||||
}
|
||||
|
||||
render() {
|
||||
const List = VirtualizedSectionList;
|
||||
/* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.66 was deployed. To see the error delete this
|
||||
* comment and run Flow. */
|
||||
return <List {...this.props} ref={this._captureRef} />;
|
||||
return <VirtualizedSectionList {...this.props} ref={this._captureRef} />;
|
||||
}
|
||||
|
||||
_wrapperListRef: MetroListView | VirtualizedSectionList<any>;
|
||||
_wrapperListRef: ?React.ElementRef<typeof VirtualizedSectionList>;
|
||||
_captureRef = ref => {
|
||||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
|
||||
* suppresses an error when upgrading Flow's support for React. To see the
|
||||
* error delete this comment and run Flow. */
|
||||
this._wrapperListRef = ref;
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user