Remove MetroListView from SectionList

Reviewed By: yungsters

Differential Revision: D10251054

fbshipit-source-id: dc801817dfcf2722e4625178117006ab51e57255
This commit is contained in:
Eli White 2018-10-09 17:25:04 -07:00 коммит произвёл Facebook Github Bot
Родитель 636d01bbd0
Коммит 4a5221884f
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -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;
};
}