const options = {
page: 1,
prePage: '⟵',
nextPage: '⟶',
firstPage: '⟸',
lastPage: '⟹',
paginationShowsTotal: showTotal,
clearSearch: true,
};
<BootstrapTable
data={products}
pagination
options={options}
striped
hover
search
>
<TableHeaderColumn width="120" dataField="currency" dataSort>Currency</TableHeaderColumn>
<TableHeaderColumn width="120" dataField="amount" dataSort>Amount</TableHeaderColumn>
<TableHeaderColumn width="170" dataField="orderNo" dataSort>Order No.</TableHeaderColumn>
<TableHeaderColumn width="80" dataField="action" dataFormat={this.action}>Action</TableHeaderColumn>
</BootstrapTable>
我正在使用“ react-bootstrap-table”库。我有来自API的数据并显示在表格中。最初的页码是“ 1”。但是,当我跳转到另一页(例如说“ 5”页)并加载其他数据时,表将显示所有数据,但页数保持不变(即“ 5”)。我想将活动页码设置为“ 1”。