mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix getItemLayout flow type to include index
Summary: The index is used to make sure the layout corresponds to the correct index, which can get out of sync if cell layout is cached and then cells are re-ordered. Reviewed By: bvaughn Differential Revision: D4554721 fbshipit-source-id: 9acb37f390a6e40ad89f813b78f81b399ec11e9a
This commit is contained in:
committed by
Facebook Github Bot
parent
b2c545dcb6
commit
91bda43e56
@@ -114,7 +114,7 @@ class MultiColumnExample extends React.PureComponent {
|
||||
</UIExplorerPage>
|
||||
);
|
||||
}
|
||||
_getItemLayout(data: any, index: number): {length: number, offset: number} {
|
||||
_getItemLayout(data: any, index: number): {length: number, offset: number, index: number} {
|
||||
return getItemLayout(data, index);
|
||||
}
|
||||
_renderItemComponent = ({item}) => {
|
||||
|
||||
Reference in New Issue
Block a user