From 94da31e570a526c669545bb3e1e24015dd479819 Mon Sep 17 00:00:00 2001 From: playmusic Date: Fri, 25 Mar 2016 17:49:52 +0800 Subject: [PATCH] fix a bug of autoload pagination --- GiftedListView.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/GiftedListView.js b/GiftedListView.js index f75a829..248d8a7 100644 --- a/GiftedListView.js +++ b/GiftedListView.js @@ -223,10 +223,14 @@ var GiftedListView = React.createClass({ }, _onPaginate() { - this.setState({ - paginationStatus: 'fetching', - }); - this.props.onFetch(this._getPage() + 1, this._postPaginate, {}); + if(this.state.paginationStatus==='allLoaded'){ + return null + }else { + this.setState({ + paginationStatus: 'fetching', + }); + this.props.onFetch(this._getPage() + 1, this._postPaginate, {}); + } }, _postPaginate(rows = [], options = {}) {