Skip to main content

Props

This package is a wrapper around react-native's FlatList. So it accepts all the props from FlatList, except for maintainVisibleContentPosition. It has support for following additional props, to fine tune your infinite scroll.

onEndReached#

Called once when the scroll position gets close to end of list. This must return a promise. You can onEndReachedThreshold as distance from end of list, when this function should be called.

typedefaultrequired
functionnullYES

onStartReached#

Called once when the scroll position gets close to begining of list. This must return a promise. You can onStartReachedThreshold as distance from beginning of list, when this function should be called.

typedefaultrequired
functionnullYES

activityIndicatorColor#

Color for inline loading indicator

typedefaultrequired
string#000000NO

enableAutoscrollToTop#

Enable autoScrollToTop. In chat type applications, you want to auto scroll to bottom, when new message comes it.

typedefaultrequired
stringfalseNO

autoscrollToTopThreshold#

The scroll offset threshold, below which auto scrolling should occur.

info

This prop only works, when enableAutoscrollToTop is set to true.

typedefaultrequired
number100NO

onStartReachedThreshold#

Scroll offset from beginning of list, when onStartReached should be called.

typedefaultrequired
number10NO

onEndReachedThreshold#

Scroll distance from end of list, when onStartReached should be called. Please note that this is different from onEndReachedThreshold of FlatList from react-native.

typedefaultrequired
number10NO

showDefaultLoadingIndicators#

If true, inline loading indicators will be shown

typedefaultrequired
booleantrueNO

HeaderLoadingIndicator#

Custom UI component for header inline loading indicator

typedefaultrequired
ComponentActivityIndicatorNO

FooterLoadingIndicator#

Custom UI component for footer inline loading indicator

typedefaultrequired
ComponentActivityIndicatorNO

ListHeaderComponent#

Custom UI component for header indicator of FlatList, which overrides the HeaderLoadingIndicator. Only used when showDefaultLoadingIndicators is false

typedefaultrequired
ComponentnullNO

ListFooterComponent#

Custom UI component for footer indicator of FlatList, which overrides the FooterLoadingIndicator. Only used when showDefaultLoadingIndicators is false

typedefaultrequired
ComponentnullNO