mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Merge pull request #24023 from NitroGhost/patch-1
[react-native] updated viewOffset for scrollToIndex on FlatList to be optional
This commit is contained in:
2
types/react-native/index.d.ts
vendored
2
types/react-native/index.d.ts
vendored
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user