mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Merge pull request #23648 from sarahscott/flatlist-scrolltoindex
[react-native] Updated scrollToIndex method of FlatList
This commit is contained in:
commit
6d08c4cece
8
types/react-native/index.d.ts
vendored
8
types/react-native/index.d.ts
vendored
@ -3643,11 +3643,11 @@ export interface FlatListStatic<ItemT> extends React.ComponentClass<FlatListProp
|
||||
scrollToEnd: (params?: { animated?: boolean }) => void;
|
||||
|
||||
/**
|
||||
* Scrolls to the item at a the specified index such that it is positioned in the viewable area
|
||||
* such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the middle.
|
||||
* May be janky without `getItemLayout` prop.
|
||||
* Scrolls to the item at the specified index such that it is positioned in the viewable area
|
||||
* 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; viewPosition?: number }) => void;
|
||||
scrollToIndex: (params: { animated?: boolean; index: number; viewOffset: number; viewPosition?: number }) => void;
|
||||
|
||||
/**
|
||||
* Requires linear scan through data - use `scrollToIndex` instead if possible.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user