Skip to content

RefreshView API

Vito Chen edited this page Sep 3, 2017 · 4 revisions

Refresh

Props Default Type Description
refreshable true bool Set it to true to enable the Refresh component
refreshableMode 'basic' string 'basic' | 'advanced'. Use this to distinguish diffrent RefreshView, including the basic RefreshControl or advanced RefreshView

RefreshControl

Props Default Type Description
refreshableTitle null string The default placeholder of the refreshControl
refreshableColors ['dimgray', 'tomato', 'limegreen'] array android only
refreshableProgressBackgroundColor 'white' string android only
refreshableSize undefined string "small" or "large"
refreshableTintColor 'lightgray' string ios only
customRefreshControl null func Customize your own View of the RefreshControl. It takes two callbacks renderRefreshControl = (isRefreshing, onRefresh) => { your code }

AdvancedRefreshView

Props Default Type Description
refreshableTitlePull 'Pull to refresh' string The default placeholder of the refreshView
refreshableTitleRelease 'Release to load' string When you drag down the list, the refreshable title will be changed
refreshableTitleRefreshing 'Loading...' string During the network fetching, the refreshable title will be changed
customRefreshView null func You can use this props to pass your own custom view to replace the default one.
refreshViewStyle null object You can style the refreshView. Make sure your refreshViewHeight is set correctly. Be careful, you need to set both of top and height style for iOS, while only height style need to be set on Android. More details, please see the Example.
refreshViewHeight 80 number You can set the correct height of your refreshView when you set refreshViewStyle, see above
displayDate true bool Whether display the default date string at the refreshView or not
dateFormat 'yyyy-MM-dd hh:mm' string The date format you want to use
dateTitle 'Last updated: ' string The date title right beside the date text
dateStyle null object You can style your date text
arrowImageSource require('./downArrow.png') object You can pass your own imageSource to this props
arrowImageStyle null object You can style your arrow image