分页下拉不工作react-bootstrap-table2

时间:2018-02-28 08:13:31

标签: reactjs bootstrap-4 react-bootstrap-table

我正在使用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,All但它没有响应。我的表中也有超过5条记录...

1 个答案:

答案 0 :(得分:2)

将此添加到您的CSS:

{{1}}
相关问题