[英]Pagination drop down not working react-bootstrap-table2
我正在使用react-bootstrap-table2,无法使分页下拉正常工作。
查看我的选项:
const options = { paginationSize: 4, pageStartIndex: 0, //alwaysShowAllBtns: true, // Always show next and previous button //withFirstAndLast: false, // Hide the going to First and Last page button // hideSizePerPage: true, // Hide the sizePerPage dropdown always // hidePageListOnlyOnePage: true, // Hide the pagination list when only one page firstPageText: 'First', prePageText: 'Back', nextPageText: 'Next', lastPageText: 'Last', nextPageTitle: 'First page', prePageTitle: 'Pre page', firstPageTitle: 'Next page', lastPageTitle: 'Last page', sizePerPageList: [{ text: '5', value: 5 },{ text: '10', value: 10 },{ text: 'All', value: this.state.currentlyDisplayed.length }] // A numeric array is also available. the purpose of above example is custom the text };
还有我的表组件
<BootstrapTable className="bsTable" striped={true} hover={true} keyField='id' data={this.state.currentlyDisplayed} columns={columns} pagination={ paginationFactory(options) } filter={ filterFactory({delay:100}) } fetchInfo={{dataTotalSize: this.state.currentlyDisplayed.length}} />
有任何想法吗? 我单击它希望看到5,10,但除响应之外的所有内容。 我的桌子上也有5条以上的记录...
将此添加到您的CSS:
.show.react-bs-table-sizePerPage-dropdown ul:last-child {
display: block;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.