Merge pull request #24023 from NitroGhost/patch-1

[react-native] updated viewOffset for scrollToIndex on FlatList to be optional
This commit is contained in:
Eloy Durán
2018-03-02 05:49:23 -05:00
committed by GitHub

View File

@@ -3652,7 +3652,7 @@ export interface FlatListStatic<ItemT> extends React.ComponentClass<FlatListProp
* such that viewPosition 0 places it at the top, 1 at the bottom, and 0.5 centered in the middle.
* Cannot scroll to locations outside the render window without specifying the getItemLayout prop.
*/
scrollToIndex: (params: { animated?: boolean; index: number; viewOffset: number; viewPosition?: number }) => void;
scrollToIndex: (params: { animated?: boolean; index: number; viewOffset?: number; viewPosition?: number }) => void;
/**
* Requires linear scan through data - use `scrollToIndex` instead if possible.