We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14bcfba commit 28561d5Copy full SHA for 28561d5
src/BootstrapTable.js
@@ -473,17 +473,19 @@ class BootstrapTable extends Component {
473
474
handlePaginationData = (page, sizePerPage) => {
475
const { onPageChange, pageStartIndex } = this.props.options;
476
+ const emptyTable = this.store.isEmpty();
477
if (onPageChange) {
478
onPageChange(page, sizePerPage);
479
}
480
- this.setState({
481
- currPage: page,
+ const state = {
482
sizePerPage,
483
reset: false
484
- });
+ };
485
+ if (!emptyTable) state.currPage = page;
486
+ this.setState(state);
487
- if (this.allowRemote(Const.REMOTE_PAGE)) {
488
+ if (this.allowRemote(Const.REMOTE_PAGE) || emptyTable) {
489
return;
490
491
0 commit comments