mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 07:35:25 +00:00
Exposed progressViewOffset to VirtualizedList and FlatList
Reviewed By: sahrens Differential Revision: D5204107 fbshipit-source-id: df2928830f84ea012d532f24c776dee8d2b96989
This commit is contained in:
parent
5840a9051d
commit
a0a7d97c7b
@ -163,6 +163,11 @@ type OptionalProps<ItemT> = {
|
|||||||
viewableItems: Array<ViewToken>,
|
viewableItems: Array<ViewToken>,
|
||||||
changed: Array<ViewToken>,
|
changed: Array<ViewToken>,
|
||||||
}) => void,
|
}) => void,
|
||||||
|
/**
|
||||||
|
* Set this when offset is needed for the loading indicator to show correctly.
|
||||||
|
* @platform android
|
||||||
|
*/
|
||||||
|
progressViewOffset?: number,
|
||||||
legacyImplementation?: ?boolean,
|
legacyImplementation?: ?boolean,
|
||||||
/**
|
/**
|
||||||
* Set this true while waiting for new data from a refresh.
|
* Set this true while waiting for new data from a refresh.
|
||||||
|
@ -121,6 +121,11 @@ type OptionalProps = {
|
|||||||
viewableItems: Array<ViewToken>,
|
viewableItems: Array<ViewToken>,
|
||||||
changed: Array<ViewToken>,
|
changed: Array<ViewToken>,
|
||||||
}) => void,
|
}) => void,
|
||||||
|
/**
|
||||||
|
* Set this when offset is needed for the loading indicator to show correctly.
|
||||||
|
* @platform android
|
||||||
|
*/
|
||||||
|
progressViewOffset?: number,
|
||||||
/**
|
/**
|
||||||
* Set this true while waiting for new data from a refresh.
|
* Set this true while waiting for new data from a refresh.
|
||||||
*/
|
*/
|
||||||
@ -303,6 +308,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
|
|||||||
'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +
|
'`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' +
|
||||||
JSON.stringify(props.refreshing) + '`',
|
JSON.stringify(props.refreshing) + '`',
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ScrollView
|
<ScrollView
|
||||||
{...props}
|
{...props}
|
||||||
@ -310,6 +316,7 @@ class VirtualizedList extends React.PureComponent<OptionalProps, Props, State> {
|
|||||||
<RefreshControl
|
<RefreshControl
|
||||||
refreshing={props.refreshing}
|
refreshing={props.refreshing}
|
||||||
onRefresh={props.onRefresh}
|
onRefresh={props.onRefresh}
|
||||||
|
progressViewOffset={props.progressViewOffset}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -46,6 +46,7 @@ exports[`FlatList renders all the bells and whistles 1`] = `
|
|||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControlMock
|
<RefreshControlMock
|
||||||
onRefresh={[Function]}
|
onRefresh={[Function]}
|
||||||
|
progressViewOffset={undefined}
|
||||||
refreshing={false}
|
refreshing={false}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
@ -281,6 +281,7 @@ exports[`SectionList renders all the bells and whistles 1`] = `
|
|||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControlMock
|
<RefreshControlMock
|
||||||
onRefresh={[Function]}
|
onRefresh={[Function]}
|
||||||
|
progressViewOffset={undefined}
|
||||||
refreshing={false}
|
refreshing={false}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
@ -282,6 +282,7 @@ exports[`VirtualizedList renders all the bells and whistles 1`] = `
|
|||||||
refreshControl={
|
refreshControl={
|
||||||
<RefreshControlMock
|
<RefreshControlMock
|
||||||
onRefresh={[Function]}
|
onRefresh={[Function]}
|
||||||
|
progressViewOffset={undefined}
|
||||||
refreshing={false}
|
refreshing={false}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user