-
-
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] Grouped data grid does not remain expanded when removing row #15284
Comments
Hey @lucasbachega ... how are you updating the rows? possibly related issue #13962 |
Sorry. I'm not using apiRef to update a row. I'm just updating an item from the array passed to the DataGrid 'rows' prop. (by state) |
You should use Example: const removeRow = React.useCallback(() => {
apiRef.current.updateRows([{ id: 12, _action: 'delete' }]);
}, [apiRef]); So, the scenario you described is actually expected behavior. Does this help? |
OK I understand. In my case, the table rows are generated from a state in Redux. The component responsible for updating each line is further away in the hierarchy, so I use Redux Toolkit's |
Sounds like you can solve your issue now, so I am closing here ... if you still need some help or encounter a related issue please feel free to reopen. 👍🏼 |
This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue. Note @lucasbachega 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
Steps:
group_expand_problem.mov
Current behavior
No response
Expected behavior
When removing or editing a grouped row, the group should remain expanded.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: group, expand
Order ID: 98639
The text was updated successfully, but these errors were encountered: