SectionList
Props
sections
sections: sections('item)
renderItem
renderItem: renderItem('item)
keyExtractor
keyExtractor: ('item, int) => string
itemSeparatorComponent
itemSeparatorComponent: separatorComponent('item)=?
reference:
let separatorComponent:
(separatorProps('item) => ReasonReact.reactElement) =>
separatorComponent('item);
type separatorProps('item) = {
highlighted: bool,
leadingItem: option('item),
leadingSection: option(section('item)),
section: section('item),
trailingItem: option('item),
trailingSection: option(section('item)),
};
type section('item) = {
data: array('item),
key: option(string),
renderItem: option(renderBag('item) => ReasonReact.reactElement),
};
type renderBag('item) = {
item: 'item,
index: int,
section: section('item),
separators: {
.
"highlight": unit => unit,
"unhighlight": unit => unit,
},
};
listEmptyComponent
listEmptyComponent: unit => ReasonReact.reactElement=?
listFooterComponent
listFooterComponent: ReasonReact.reactElement=?
listHeaderComponent
listHeaderComponent: ReasonReact.reactElement=?
sectionSeparatorComponent
sectionSeparatorComponent: separatorComponent('item)=?
reference:
let separatorComponent:
(separatorProps('item) => ReasonReact.reactElement) =>
separatorComponent('item);
type separatorProps('item) = {
highlighted: bool,
leadingItem: option('item),
leadingSection: option(section('item)),
section: section('item),
trailingItem: option('item),
trailingSection: option(section('item)),
};
type section('item) = {
data: array('item),
key: option(string),
renderItem: option(renderBag('item) => ReasonReact.reactElement),
};
type renderBag('item) = {
item: 'item,
index: int,
section: section('item),
separators: {
.
"highlight": unit => unit,
"unhighlight": unit => unit,
},
};
inverted
inverted: bool=?
extraData
extraData: 'extraData=?
initialNumToRender
initialNumToRender: int=?
onEndReached
onEndReached: {. "distanceFromEnd": float} => unit=?
onEndReachedThreshold
onEndReachedThreshold: float=?
onViewableItemsChanged
onViewableItemsChanged: {
.
"changed": array(viewToken('item)),
"viewableItems": array(viewToken('item)),
}=?
reference:
type viewToken('item) = {
.
"index": Js.undefined(int),
"isViewable": bool,
"item": 'item,
"key": string,
"section": section('item),
};
onRefresh
onRefresh: unit => unit=?
refreshing
refreshing: bool=?
renderSectionHeader
renderSectionHeader: renderAccessoryView('item)=?
reference:
let renderAccessoryView:
(renderAccessory('item) => ReasonReact.reactElement) =>
renderAccessoryView('item);
type renderAccessory('item) = {section: section('item)};
type renderBag('item) = {
item: 'item,
index: int,
section: section('item),
separators: {
.
"highlight": unit => unit,
"unhighlight": unit => unit,
},
}
and section('item) = {
data: array('item),
key: option(string),
renderItem: option(renderBag('item) => ReasonReact.reactElement),
};
renderSectionFooter
renderSectionFooter: renderAccessoryView('item)=?
reference:
let renderAccessoryView:
(renderAccessory('item) => ReasonReact.reactElement) =>
renderAccessoryView('item);
type renderAccessory('item) = {section: section('item)};
type renderBag('item) = {
item: 'item,
index: int,
section: section('item),
separators: {
.
"highlight": unit => unit,
"unhighlight": unit => unit,
},
}
and section('item) = {
data: array('item),
key: option(string),
renderItem: option(renderBag('item) => ReasonReact.reactElement),
};
stickySectionHeadersEnabled
stickySectionHeadersEnabled: bool=?
keyboardDismissMode
keyboardDismissMode: [
| `none
| `interactive
| `onDrag
]=?
keyboardShouldPersistTaps
keyboardShouldPersistTaps: [
| `always
| `never
| `handled
]=?
showsHorizontalScrollIndicator
showsHorizontalScrollIndicator: bool=?
showsVerticalScrollIndicator
showsVerticalScrollIndicator: bool=?
getItemLayout
getItemLayout: (option(array('item)), int) => {
.
"length": int,
"offset": int,
"index": int
}=?