Skip to content

Commit 4ad5789

Browse files
committed
Merge pull request #34 from playmusic9/master
fix a bug of autoload pagination
2 parents cad7b65 + 94da31e commit 4ad5789

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
@@ -225,10 +225,14 @@ var GiftedListView = React.createClass({
225225
},
226226

227227
_onPaginate() {
228-
this.setState({
229-
paginationStatus: 'fetching',
230-
});
231-
this.props.onFetch(this._getPage() + 1, this._postPaginate, {});
228+
if(this.state.paginationStatus==='allLoaded'){
229+
return null
230+
}else {
231+
this.setState({
232+
paginationStatus: 'fetching',
233+
});
234+
this.props.onFetch(this._getPage() + 1, this._postPaginate, {});
235+
}
232236
},
233237

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

0 commit comments

Comments
 (0)