gameboyVito / react-native-ultimate-listview

A high performance FlatList providing customised pull-to-refresh | auto-pagination & infinite-scrolling | gridview layout | swipeable-row.
https://www.npmjs.com/package/react-native-ultimate-listview
MIT License
540 stars 87 forks source link

Update ultimateListView.js #7

Closed wengcan closed 7 years ago

wengcan commented 7 years ago

fix problem: pagination content not in the center when the UltimateListView is wrapped with some element ( such as ScrollView )

gameboyVito commented 7 years ago

Hi, @wengcan thx for your effort. The reason why I set the width of paginationView to be the device width is because I need to make sure the FooterView can be displayed on both of list and grid mode correctly. If you want to wrap this component to another component like ListView, you can customize them by passing your own component with your own styles to emptyView, paginationFetchingView, paginationWaitingView, paginationAllLoadedView

<UltimateListView
        ...other props
        emptyView={this.renderEmptyView}
        paginationFetchingView={this.renderPaginationFetchingView}
        paginationWaitingView={this.renderPaginationWaitingView}
        paginationAllLoadedView={this.renderPaginationAllLoadedView}
/>
wengcan commented 7 years ago

Hi @gameboyVito , seems it works well even if you don't set the width of the style in both list and grid mode

gameboyVito commented 7 years ago

Yes, that's because you are using the new FlatList version. If you are using the old ListView verision by setting legacyImplementation to true, this width style is important

wengcan commented 7 years ago

thx @gameboyVito