From 2e636ba8e0b4e2446052006b992c86bcfa7fef78 Mon Sep 17 00:00:00 2001 From: CHEN Jiajie Date: Wed, 6 Sep 2017 10:45:09 +0800 Subject: [PATCH] Bug fixed - hide allLoadedView when the emptyView is rendered --- src/ultimateListView.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ultimateListView.js b/src/ultimateListView.js index 048beca..8cfa2fc 100644 --- a/src/ultimateListView.js +++ b/src/ultimateListView.js @@ -315,7 +315,7 @@ export default class UltimateListView extends Component { return ( - + {this.props.allLoadedText} @@ -388,7 +388,7 @@ export default class UltimateListView extends Component { return this.paginationWaitingView(this.onPaginate); } else if (this.state.paginationStatus === PaginationStatus.waiting && this.props.autoPagination === true) { return this.paginationWaitingView(); - } else if (this.state.paginationStatus === PaginationStatus.allLoaded) { + } else if (this.getRows().length !== 0 && this.state.paginationStatus === PaginationStatus.allLoaded) { return this.paginationAllLoadedView(); } @@ -501,7 +501,8 @@ const styles = StyleSheet.create({ alignItems: 'center' }, allLoadedText: { - alignSelf: 'center' + alignSelf: 'center', + color: '#bfbfbf' }, gridItem: { overflow: 'hidden',