Skip to content

Commit

Permalink
fix #526
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jun 30, 2016
1 parent aa1db57 commit edd5581
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/BootstrapTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,16 @@ class BootstrapTable extends Component {
const copy = this.props.selectRow.selected.slice();
this.store.setSelectedRowKey(copy);
}
let currPage = Const.PAGE_START_INDEX;
if (typeof this.props.options.page !== 'undefined') {
currPage = this.props.options.page;
} else if (typeof this.props.options.pageStartIndex !== 'undefined') {
currPage = this.props.options.pageStartIndex;
}

this.state = {
data: this.getTableData(),
currPage: this.props.options.page ||
this.props.options.pageStartIndex ||
Const.PAGE_START_INDEX,
currPage: currPage,
sizePerPage: this.props.options.sizePerPage || Const.SIZE_PER_PAGE_LIST[0],
selectedRowKeys: this.store.getSelectedRowKeys()
};
Expand Down

0 comments on commit edd5581

Please sign in to comment.