gregnb / gregnb/mui-datatables
Selected rows persist on page change
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
The table state that manages the selected rows should reset on page change and clear all selections when navigating through pages
## Current Behavior
The rows selected on a particular page persist on to the other page when page is changed
## Steps to Reproduce (for bugs)
Run [this example](https://github.com/gregnb/mui-datatables/blob/master/examples/serverside-pagination/index.js) and change the `rowsPerPage` to 10.
1. Select the first row
2. Navigate to the next page
3. The first row in the second page is selected
4. Select a different row in page 2
5. Navigate back to the first page
6. The rows selected on page 2 persist on page 1
## Your Environment
| Tech | Version |
|--------------|---------|
| Material-UI | v5 |
| MUI-datatables | ^4.2.2 |
| React | 17.0.2 |
| browser | Brave |
| OS | Windows |
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.