-
-
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] Allow to change to expansion status of several groups at once #4930
Comments
Hi, You can expand / collapse one group using the You can do it on init with |
And my sort of follow up question was whether it is possible to export the state of expansion that the grid is in and reapply it during the next user session? |
The extension status of a group is not controllable. But you could:
I did a basic implementation https://codesandbox.io/s/data-grid-pro-forked-dtzcmo?file=/src/App.tsx |
This is very helpful! I will try doing it this way! Thanks @flaviendelangle! |
@flaviendelangle, is the a plan to make the |
What would then be the expected behavior ? |
@flaviendelangle, sorry for getting back to you late. Yes, I would imagine it would be the sort of behavior expected. I know you can pass a prop that would have defaultGroupingExpansion depth to determine which level is expanded on the initial render. However, I would like this prop to be controlled. I was able to mimic behavior with the setRowChildrenExpansion method on the api in a way you are describing. |
we really really need this. |
Order ID 💳
31986
The problem in depth 🔍
Hello!
I am trying to have the Tree Data Grid component where the user can select from the dropdown list the level of expansion of the tree data. Maybe I am missing something, but I noticed that there is no option for me to set through API ref which rows I want to have expanded.
Is there a way to do this in code. E.G. When the user has the selector where they can say "expand level 2 in the tree" through API ref I set the rows which need to be expanded.
I would appreciate your support!
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: