Upgrade to v0.44.0

Reviewed By: zertosh

Differential Revision: D4893660

fbshipit-source-id: ed85f5d4c585164d464a7e009888a28e5af339cd
This commit is contained in:
Gabe Levi
2017-04-17 09:25:28 -07:00
committed by Facebook Github Bot
parent d5601a3e12
commit 92f900c79d
6 changed files with 20 additions and 9 deletions

View File

@@ -28,6 +28,7 @@ type NormalProps = {
// Provide either `items` or `sections`
items?: ?Array<Item>, // By default, an Item is assumed to be {key: string}
// $FlowFixMe - Something is a little off with the type Array<Item>
sections?: ?Array<{key: string, data: Array<Item>}>,
/**
@@ -39,10 +40,16 @@ type NormalProps = {
* Set this true while waiting for new data from a refresh.
*/
refreshing?: boolean,
/**
* If true, renders items next to each other horizontally instead of stacked vertically.
*/
horizontal?: ?boolean,
};
type DefaultProps = {
keyExtractor: (item: Item) => string,
keyExtractor: (item: Item, index: number) => string,
};
/* $FlowFixMe - the renderItem passed in from SectionList is optional there but
* required here */
type Props = NormalProps & DefaultProps;
/**
@@ -74,7 +81,7 @@ class MetroListView extends React.Component {
return this._listRef;
}
static defaultProps: DefaultProps = {
keyExtractor: (item, index) => item.key || index,
keyExtractor: (item, index) => item.key || String(index),
renderScrollComponent: (props: Props) => {
if (props.onRefresh) {
return (

View File

@@ -156,6 +156,8 @@ type OptionalProps<SectionT: SectionBase<any>> = {
* enabled by default on iOS because that is the platform standard there.
*/
stickySectionHeadersEnabled?: boolean,
legacyImplementation?: ?boolean,
};
type Props<SectionT> = RequiredProps<SectionT>

View File

@@ -134,6 +134,8 @@ type OptionalProps = {
*/
windowSize: number,
};
/* $FlowFixMe - this Props seems to be missing a bunch of stuff. Remove this
* comment to see the errors */
export type Props = RequiredProps & OptionalProps;
let _usedIndexForKey = false;