Skip to content

ListView API

Vito Chen edited this page Jun 15, 2017 · 6 revisions

General

Prop Default Type Description
legacyImplementation false bool Set this to true to enable lagacy ListView implemantation, if you do not want to use FlatList

ListView

Prop Default Type Description
header null func This is the header of the listview, which is always shown at the top of the list
item null func This is the row content of the listview, which will be rendered row by row
paginationFetchingView null func This view will be displayed when you are fetching the data from the server at the first time
paginationAllLoadedView null func This view will be displayed, if there is no more rowView returned from the server. It means the list has been loaded completely
paginationWaitingView null func This view will be displayed when you are loading more data from the server. It should be the FooterView of the ListView. By default, it will show a loading spinner
emptyView null func If there is no data while you are trying to fetch data from the server at the first time, this view will be displayed
separator null any true, false, func. You can set it to true to display the separator in the default style, or false to hide the separator. And, you can customise it by passing your own View Component

GridView

Props Default Type Description
numColumns 1 number Set it to be larger than 1 to enable grid layout
columnWrapperStyle null object Customised your cell style when you are using grid layout in your FlatList. This prop only works on FlatList