Skip to content

Commit

Permalink
Changed the scroll index depending on platform in VirtualizedSectionList
Browse files Browse the repository at this point in the history
  • Loading branch information
Melina Young committed Oct 8, 2018
1 parent 87129b0 commit d3cf10c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Libraries/Lists/VirtualizedSectionList.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'use strict';

const React = require('React');
const Platform = require('../Utilities/Platform');
const View = require('View');
const VirtualizedList = require('VirtualizedList');

Expand Down Expand Up @@ -145,7 +146,7 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
sectionIndex: number,
viewPosition?: number,
}) {
let index = params.itemIndex + 0;
let index = Platform.OS === 'ios'? params.itemIndex: params.itemIndex - 1;
for (let ii = 0; ii < params.sectionIndex; ii++) {
index += this.props.sections[ii].data.length + 2;
}
Expand Down

0 comments on commit d3cf10c

Please sign in to comment.