-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[data grid] Row selection does not preserve when clearing header filters #14894
Comments
@MBilalShafi this is likely related to #13757 ... could you have a look? |
I added it to the board so we don't lose track of this. |
Hey @Marioblancocid, this is an expected behavior introduced in v7.19 to fix a bug, here's the relevant PR: #14677 You could opt out of this behavior by passing Here's the updated demo where the selection is kept: https://codesandbox.io/p/sandbox/datagridpro-7-19-forked-zlhtc4 Let me know if it resolves your concern. |
Perfectly working with the keepNonExistentRowsSelected prop! Thank you so much and sorry for tagging it as a bug. I really appreciate the help! |
Great, I'll consider the issue resolved in that case. |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @Marioblancocid How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
BUG on 7.19: https://codesandbox.io/p/sandbox/datagridpro-7-19-ym3mmw
Example working on 7.18: https://codesandbox.io/p/sandbox/datagridpro-7-18-nfgqhc
Current behavior
After updating to 7.19, if you have a selected row and you try to search something that doesn't exist on the rows through a headerFilter (I have a custom one), and then you clear that filter, you realise that you lost your selection.
Expected behavior
It shouldn't lose its selected row as it happens on previous versions like 7.18 https://codesandbox.io/p/sandbox/datagridpro-7-18-nfgqhc
Context
No response
Your environment
npx @mui/envinfo
Search keywords: bug,grid,mui,x,headerfilters,header,filters
The text was updated successfully, but these errors were encountered: