Skip to content

Commit

Permalink
fix scrollToLocation does not scroll to top on android
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed May 7, 2019
1 parent fc8008e commit d486e2b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Libraries/Lists/VirtualizedSectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
'use strict';

const Platform = require('Platform');
const React = require('React');
const View = require('View');
const VirtualizedList = require('VirtualizedList');
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit d486e2b

Please sign in to comment.