mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 04:49:15 +08:00
Merge pull request #22182 from damir-sirola/patch-1
Fix react-native FlatList scrollToItem method signature
This commit is contained in:
2
types/react-native/index.d.ts
vendored
2
types/react-native/index.d.ts
vendored
@@ -3614,7 +3614,7 @@ export interface FlatListStatic<ItemT> extends React.ComponentClass<FlatListProp
|
||||
* Requires linear scan through data - use `scrollToIndex` instead if possible.
|
||||
* May be janky without `getItemLayout` prop.
|
||||
*/
|
||||
scrollToItem: (params: { animated?: boolean; index: number; viewPosition?: number }) => void;
|
||||
scrollToItem: (params: { animated?: boolean; item: ItemT; viewPosition?: number }) => void;
|
||||
|
||||
/**
|
||||
* Scroll to a specific content pixel offset, like a normal `ScrollView`.
|
||||
|
||||
Reference in New Issue
Block a user