Skip to content

Commit aefd8db

Browse files
committed
fix scrollToLocation cannot scroll to top on android
1 parent ddce743 commit aefd8db

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Libraries/Lists/VirtualizedSectionList.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010
'use strict';
1111

12-
const Platform = require('../Utilities/Platform');
1312
const React = require('react');
1413
const View = require('../Components/View/View');
1514
const VirtualizedList = require('./VirtualizedList');
@@ -145,7 +144,7 @@ class VirtualizedSectionList<
145144
sectionIndex: number,
146145
viewPosition?: number,
147146
}) {
148-
let index = Platform.OS === 'ios' ? params.itemIndex : params.itemIndex + 1;
147+
let index = params.itemIndex;
149148
for (let i = 0; i < params.sectionIndex; i++) {
150149
index += this.props.getItemCount(this.props.sections[i].data) + 2;
151150
}

0 commit comments

Comments
 (0)