From 4a5221884f7dfd431840c09f860451739bf8a98f Mon Sep 17 00:00:00 2001 From: Eli White Date: Tue, 9 Oct 2018 17:25:04 -0700 Subject: [PATCH] Remove MetroListView from SectionList Reviewed By: yungsters Differential Revision: D10251054 fbshipit-source-id: dc801817dfcf2722e4625178117006ab51e57255 --- Libraries/Lists/SectionList.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Libraries/Lists/SectionList.js b/Libraries/Lists/SectionList.js index 10c26fd143..32fd2c8599 100644 --- a/Libraries/Lists/SectionList.js +++ b/Libraries/Lists/SectionList.js @@ -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> 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> 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 ; + return ; } - _wrapperListRef: MetroListView | VirtualizedSectionList; + _wrapperListRef: ?React.ElementRef; _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; }; }