Skip to content

Commit 94da31e

Browse files
author
playmusic
committed
fix a bug of autoload pagination
1 parent 25e166b commit 94da31e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

GiftedListView.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,14 @@ var GiftedListView = React.createClass({
223223
},
224224

225225
_onPaginate() {
226-
this.setState({
227-
paginationStatus: 'fetching',
228-
});
229-
this.props.onFetch(this._getPage() + 1, this._postPaginate, {});
226+
if(this.state.paginationStatus==='allLoaded'){
227+
return null
228+
}else {
229+
this.setState({
230+
paginationStatus: 'fetching',
231+
});
232+
this.props.onFetch(this._getPage() + 1, this._postPaginate, {});
233+
}
230234
},
231235

232236
_postPaginate(rows = [], options = {}) {

0 commit comments

Comments
 (0)