Skip to content

Commit 3e82f11

Browse files
committed
itemindex change
1 parent 47e7768 commit 3e82f11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Libraries/Lists/VirtualizedSectionList.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'use strict';
1111

1212
const React = require('React');
13+
const Platform = require('../Utilities/Platform');
1314
const View = require('View');
1415
const VirtualizedList = require('VirtualizedList');
1516

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

0 commit comments

Comments
 (0)