Skip to content

react-bootstrap-table2-paginator curent page not change after react-boot-table data changed #369

@fanzhh

Description

@fanzhh
  • "react-bootstrap-table-next": "^0.1.12"
  • "react-bootstrap-table2-paginator": "^0.1.4",
import BootstrapTable from 'react-bootstrap-table-next';
import 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css';
import paginationFactory from 'react-bootstrap-table2-paginator';
import 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css';
...
<BootstrapTable
            keyField = 'id'
            data = { this.state.products }
            columns = { this.state.columns }
            pagination = { paginationFactory() }
/>

react-bootstrap-table2-paginator works fine with react-bootstrap-table-next when current page is first. but when current page is not the first, this.state.products is changed and the data amount less that page, the current page is not changed with data's change and the table shows blank.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions