mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-06 06:19:58 +08:00
Added missing getItemLayout prop to SectionList
This commit is contained in:
12
types/react-native/index.d.ts
vendored
12
types/react-native/index.d.ts
vendored
@@ -3743,6 +3743,18 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
|
||||
*/
|
||||
extraData?: any
|
||||
|
||||
/**
|
||||
* `getItemLayout` is an optional optimization that lets us skip measurement of dynamic
|
||||
* content if you know the height of items a priori. getItemLayout is the most efficient,
|
||||
* and is easy to use if you have fixed height items, for example:
|
||||
* ```
|
||||
* getItemLayout={(data, index) => (
|
||||
* {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index}
|
||||
* )}
|
||||
* ```
|
||||
*/
|
||||
getItemLayout?: (data: SectionListData<ItemT>[] | null, index: number) => {length: number, offset: number, index: number}
|
||||
|
||||
/**
|
||||
* How many items to render in the initial batch
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user