Skip to content

Commit ace966a

Browse files
authored
Solve a warning
Warning: Failed child context type: Invalid child context virtualizedCell.cellKey of type number supplied to CellRenderer, expected string。 Modify the 262 line keyExtractor (item, index) { return index.toString(); // old : return index; }
1 parent c671f00 commit ace966a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/ViewPager/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export default class ViewPager extends PureComponent {
260260
}
261261

262262
keyExtractor (item, index) {
263-
return index;
263+
return index.toString();
264264
}
265265

266266
renderRow ({ item, index }) {

0 commit comments

Comments
 (0)