We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent aa1db57 commit edd5581Copy full SHA for edd5581
src/BootstrapTable.js
@@ -36,12 +36,16 @@ class BootstrapTable extends Component {
36
const copy = this.props.selectRow.selected.slice();
37
this.store.setSelectedRowKey(copy);
38
}
39
+ let currPage = Const.PAGE_START_INDEX;
40
+ if (typeof this.props.options.page !== 'undefined') {
41
+ currPage = this.props.options.page;
42
+ } else if (typeof this.props.options.pageStartIndex !== 'undefined') {
43
+ currPage = this.props.options.pageStartIndex;
44
+ }
45
46
this.state = {
47
data: this.getTableData(),
- currPage: this.props.options.page ||
- this.props.options.pageStartIndex ||
- Const.PAGE_START_INDEX,
48
+ currPage: currPage,
49
sizePerPage: this.props.options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0],
50
selectedRowKeys: this.store.getSelectedRowKeys()
51
};
0 commit comments