mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 22:58:19 +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';
|
'use strict';
|
||||||
|
|
||||||
const MetroListView = require('MetroListView');
|
|
||||||
const Platform = require('Platform');
|
const Platform = require('Platform');
|
||||||
const React = require('React');
|
const React = require('React');
|
||||||
const ScrollView = require('ScrollView');
|
const ScrollView = require('ScrollView');
|
||||||
@ -277,8 +276,10 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
|
|||||||
viewOffset?: number,
|
viewOffset?: number,
|
||||||
viewPosition?: number,
|
viewPosition?: number,
|
||||||
}) {
|
}) {
|
||||||
|
if (this._wrapperListRef != null) {
|
||||||
this._wrapperListRef.scrollToLocation(params);
|
this._wrapperListRef.scrollToLocation(params);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.
|
* Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.
|
||||||
@ -326,18 +327,14 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const List = VirtualizedSectionList;
|
|
||||||
/* $FlowFixMe(>=0.66.0 site=react_native_fb) This comment suppresses an
|
/* $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
|
* error found when Flow v0.66 was deployed. To see the error delete this
|
||||||
* comment and run Flow. */
|
* 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 => {
|
_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;
|
this._wrapperListRef = ref;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user