Re-order optional props to match documentation

This commit is contained in:
Andrew Goodale
2017-04-20 11:28:48 -04:00
parent ac241b3645
commit f48da02f41

View File

@@ -3632,9 +3632,24 @@ export interface SectionListData<ItemT> {
export interface SectionListProperties<ItemT> extends ScrollViewProperties {
/**
* An array of objects with data for each section.
* Rendered in between adjacent Items within each section.
*/
sections: SectionListData<ItemT>[]
ItemSeparatorComponent?: React.ComponentClass<any> | null
/**
* Rendered at the very end of the list.
*/
ListFooterComponent?: React.ComponentClass<any> | null
/**
* Rendered at the very beginning of the list.
*/
ListHeaderComponent?: React.ComponentClass<any> | null
/**
* Rendered in between each section.
*/
SectionSeparatorComponent?: React.ComponentClass<any> | null
/**
* Used to extract a unique key for a given item at the specified index. Key is used for caching
@@ -3643,6 +3658,17 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
*/
keyExtractor?: (item: ItemT, index: number) => string
/**
* If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality.
* Make sure to also set the refreshing prop correctly.
*/
onRefresh?: (() => void) | null
/**
* Set this true while waiting for new data from a refresh.
*/
refreshing?: boolean | null
/**
* Default renderer for every item in every section. Can be over-ridden on a per-section basis.
*/
@@ -3654,35 +3680,9 @@ export interface SectionListProperties<ItemT> extends ScrollViewProperties {
renderSectionHeader?: (info: {section: SectionListData<ItemT>}) => React.ReactElement<any> | null
/**
* Rendered in between each item, but not at the top or bottom
* An array of objects with data for each section.
*/
ItemSeparatorComponent?: React.ComponentClass<any> | null
/**
* Rendered at the bottom of all the items.
*/
ListFooterComponent?: React.ComponentClass<any> | null
/**
* Rendered at the top of all the items.
*/
ListHeaderComponent?: React.ComponentClass<any> | null
/**
* Rendered in between each section.
*/
SectionSeparatorComponent?: React.ComponentClass<any> | null
/**
* If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality.
* Make sure to also set the refreshing prop correctly.
*/
onRefresh?: (() => void) | null
/**
* Set this true while waiting for new data from a refresh.
*/
refreshing?: boolean | null
sections: SectionListData<ItemT>[]
/**
* Render a custom scroll component, e.g. with a differently styled `RefreshControl`.