-
-
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] tree collapses when controlled row selection is used #13605
Comments
A new set of rows is created at each selection state render https://github.com/huy-nguyen/bug-demo-mui-data-grid-tree-collapse/blob/e78075eabd0857ee97ac55ad6705cc6861a2f5e8/src/OuterApp.tsx#L8-L9 Per https://mui.com/x/react-data-grid/row-definition/#feeding-data
The behavior described makes seems more or less expected. It actually makes me wonder if we should have a prop model to control the |
@oliviertassinari this came up very often lately and we do have a similar issue already on the board: #13064 Makes me think if should build a more sustainable way of handling expansion state as well. RN we are not able to allow for a controlled expansion state ootb |
@michelengelen Right, it sounds like this issue is a duplicate then. |
@huy-nguyen: 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
Link to live example: (required)
Steps:
Current behavior
The parent row collapses. See recording.
Screen.Recording.2024-06-22.at.12.30.00.PM.mov
Expected behavior
Selecting child rows should not cause the parent row to collapse its children if the data stays the same.
Context
I'm trying to use controlled row selection to allow users to select (across many levels) which rows in a hierarchical data grid a data pipeline should be run on.
Your environment
npx @mui/envinfo
Search keywords: data grid row selection tree
Order ID: 80804
The text was updated successfully, but these errors were encountered: