mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-08 09:17:06 +08:00
[React Native] Improved typings for FlatList and SectionList
This commit is contained in:
14
types/react-native/index.d.ts
vendored
14
types/react-native/index.d.ts
vendored
@@ -3428,7 +3428,7 @@ export interface ViewabilityConfig {
|
||||
/**
|
||||
* @see https://facebook.github.io/react-native/docs/flatlist.html#props
|
||||
*/
|
||||
export interface FlatListProperties<ItemT> {
|
||||
export interface FlatListProperties<ItemT> extends ScrollViewProperties {
|
||||
|
||||
/**
|
||||
* Rendered in between each item, but not at the top or bottom
|
||||
@@ -3436,14 +3436,14 @@ export interface FlatListProperties<ItemT> {
|
||||
ItemSeparatorComponent?: React.ComponentClass<any> | null
|
||||
|
||||
/**
|
||||
* Rendered at the bottom of all the items.
|
||||
* Rendered at the very end of the list.
|
||||
*/
|
||||
ListFooterComponent?: React.ComponentClass<any> | null
|
||||
ListFooterComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
|
||||
|
||||
/**
|
||||
* Rendered at the top of all the items.
|
||||
* Rendered at the very beginning of the list.
|
||||
*/
|
||||
ListHeaderComponent?: React.ComponentClass<any> | null
|
||||
ListHeaderComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
|
||||
|
||||
/**
|
||||
* Optional custom style for multi-item rows generated when numColumns > 1
|
||||
@@ -3621,12 +3621,12 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
|
||||
/**
|
||||
* Rendered at the very end of the list.
|
||||
*/
|
||||
ListFooterComponent?: React.ComponentClass<any> | null
|
||||
ListFooterComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
|
||||
|
||||
/**
|
||||
* Rendered at the very beginning of the list.
|
||||
*/
|
||||
ListHeaderComponent?: React.ComponentClass<any> | null
|
||||
ListHeaderComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null
|
||||
|
||||
/**
|
||||
* Rendered in between each section.
|
||||
|
||||
Reference in New Issue
Block a user