-
-
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
[MUI Data Grid] Row group collapses when row data is updated #8580
Comments
Could you provide a CodeSandbox showing how you're updating the row? I tested with |
@m4theushw - We don't use apiRef.current.updateRows to update rows. We are simply updating the |
Hi @m4theushw we are trying to use You could reproduce the error in this demo: https://codesandbox.io/s/admiring-sun-kvi6ji?file=/demo.tsx. |
Hi @cherniavskii, we are testing the new changes (#8693), but we are having other issue when use Here is the link of Code Sandbox: https://codesandbox.io/s/kind-lamarr-ofjvim?file=/demo.tsx:1588-1598. If you expand the last group and click in Thanks for your help! |
Thanks, @edwinpgm! |
Order ID or Support key 💳 (optional)
55516
Duplicates
Latest version
The problem in depth 🔍
Our data grid loads in collapsed mode when the page is loaded. We set
defaultGroupingExpansionDepth
to 0 for some pages, and this is not reset when data is updated.Now when a specific row is updated, we refetch the updated data from the server. When this data is received, the grid resets to the collapsed mode, and all rows are hidden. We removed the
defaultGroupingExpansionDepth
prop entirely, but since the default state as per your documentation is collapsed, it falls back to this mode on refetch. Source - https://mui.com/x/react-data-grid/row-grouping/#group-expansionIs this expected behaviour? I'm not sure if this is a bug or not, but if so how do we bypass this. We want to be able to retain expanded row groups even when the data is updated. Would like to know if this is possible with the current props the grid uses and if not, what workarounds are possible. Thanks!
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: