Skip to content

Commit

Permalink
fix scrollToLocation cannot scroll to top on android
Browse files Browse the repository at this point in the history
  • Loading branch information
vonovak committed May 13, 2019
1 parent ddce743 commit aefd8db
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('../Utilities/Platform');
const React = require('react');
const View = require('../Components/View/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 aefd8db

Please sign in to comment.