Skip to content

Conversation

@sean-ww
Copy link
Contributor

@sean-ww sean-ww commented Jun 6, 2018

The issue:
When changing pages on a remote implementation with filters componentWillReceiveProps fires twice. It fires once on the initial page change click, and again when the updated data is received. Therefore, when data (2nd time it fires) is received the current logic believes a page hasn't been selected. It subsequently sets the current page to the start index value incorrectly.
For example, with my remote implementation: if I select page 4, the second time pagination componentWillReceiveProps fires, I end up with page 1 being selected whilst I have received page 4 data.

@AllenFang
Copy link
Member

@sean-ww thanks, i will check this out :)

@AllenFang AllenFang merged commit 42c6bc0 into react-bootstrap-table:master Jun 23, 2018
@AllenFang
Copy link
Member

@sean-ww thanks your contribution, this patch released on react-bootstrap-table2-paginator@0.1.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants