From aefd8db56c00f0e50d1f13086df919e88e3f1c00 Mon Sep 17 00:00:00 2001 From: Vojtech Novak Date: Mon, 13 May 2019 14:39:14 +0200 Subject: [PATCH] fix scrollToLocation cannot scroll to top on android --- Libraries/Lists/VirtualizedSectionList.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Libraries/Lists/VirtualizedSectionList.js b/Libraries/Lists/VirtualizedSectionList.js index 042eca2c5d7304..ebd12dfad57dc7 100644 --- a/Libraries/Lists/VirtualizedSectionList.js +++ b/Libraries/Lists/VirtualizedSectionList.js @@ -9,7 +9,6 @@ */ 'use strict'; -const Platform = require('../Utilities/Platform'); const React = require('react'); const View = require('../Components/View/View'); const VirtualizedList = require('./VirtualizedList'); @@ -145,7 +144,7 @@ class VirtualizedSectionList< sectionIndex: number, viewPosition?: number, }) { - let index = Platform.OS === 'ios' ? params.itemIndex : params.itemIndex + 1; + let index = params.itemIndex; for (let i = 0; i < params.sectionIndex; i++) { index += this.props.getItemCount(this.props.sections[i].data) + 2; }