FIX Update FlatList and SectionList props (#29543)

This commit is contained in:
Kacper Wiszczuk
2018-10-08 20:48:54 +02:00
committed by Andy
parent 797efa7948
commit fc91b889a2

View File

@@ -3846,22 +3846,22 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
/**
* Rendered in between each item, but not at the top or bottom
*/
ItemSeparatorComponent?: React.ComponentType<any> | (() => React.ReactElement<any>) | null;
ItemSeparatorComponent?: React.ComponentType<any>;
/**
* Rendered when the list is empty.
*/
ListEmptyComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListEmptyComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered at the very end of the list.
*/
ListFooterComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListFooterComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered at the very beginning of the list.
*/
ListHeaderComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListHeaderComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Optional custom style for multi-item rows generated when numColumns > 1
@@ -4042,7 +4042,7 @@ export interface SectionBase<ItemT> {
renderItem?: SectionListRenderItem<ItemT>;
ItemSeparatorComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null;
ItemSeparatorComponent?: React.ComponentType<any>;
keyExtractor?: (item: ItemT, index: number) => string;
}
@@ -4065,27 +4065,27 @@ export interface SectionListProps<ItemT> extends VirtualizedListWithoutRenderIte
/**
* Rendered in between adjacent Items within each section.
*/
ItemSeparatorComponent?: React.ComponentType<any> | null;
ItemSeparatorComponent?: React.ComponentType<any>;
/**
* Rendered when the list is empty.
*/
ListEmptyComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListEmptyComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered at the very end of the list.
*/
ListFooterComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null;
ListFooterComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered at the very beginning of the list.
*/
ListHeaderComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListHeaderComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered in between each section.
*/
SectionSeparatorComponent?: React.ComponentClass<any> | (() => React.ReactElement<any>) | null;
SectionSeparatorComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* A marker property for telling the list to re-render (since it implements PureComponent).
@@ -4229,19 +4229,19 @@ export interface SectionListStatic<SectionT> extends React.ComponentClass<Sectio
* Rendered when the list is empty. Can be a React Component Class, a render function, or
* a rendered element.
*/
ListEmptyComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListEmptyComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered at the bottom of all the items. Can be a React Component Class, a render function, or
* a rendered element.
*/
ListFooterComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListFooterComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* Rendered at the top of all the items. Can be a React Component Class, a render function, or
* a rendered element.
*/
ListHeaderComponent?: React.ComponentClass<any> | React.ReactElement<any> | (() => React.ReactElement<any>) | null;
ListHeaderComponent?: React.ComponentType<any> | React.ReactElement<any>;
/**
* The default accessor functions assume this is an Array<{key: string}> but you can override