Skip to content

Commit 7093d58

Browse files
committed
fix setState will cause changing to page one if selected row is on last page
1 parent 4df772a commit 7093d58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/BootstrapTable.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class BootstrapTable extends Component {
163163
} else {
164164
// #125
165165
if (!options.page &&
166-
page >= Math.ceil(nextProps.data.length / sizePerPage)) {
166+
page > Math.ceil(nextProps.data.length / sizePerPage)) {
167167
page = 1;
168168
}
169169
const sortInfo = this.store.getSortInfo();

0 commit comments

Comments
 (0)