AllenFang / AllenFang/react-bootstrap-table

Reseting currPage if handleFilterData() was called

Open
#1,738 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.2k
Forks
761
PR merge metrics
No merged PRs in 30d

Description

We use the table with pagination and row filter. When we display the second page and changing the filter, so that no longer a second page available a blank screen appears. Our solution is to reset the internal state "currPage" to 1 before the filtering occurs.
We would expect that this behaviour happens every time when handleFilterData was called.

```
this.refs.table.state.currPage = 1; // this is our workaround hack!!!
this.refs.table.handleFilterData(filter);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.