Skip to content

[data grid][docs] Fix datagrid inline props where it causes logic bugs #9295

Open
@mkuenemann

Description

@mkuenemann

The problem in depth 🔍

We have a problem with data-grid pro version for grouped rows. I have reported it on Zendesk too (https://mui.zendesk.com/agent/tickets/9025)

https://codesandbox.io/s/data-grid-community-forked-vv5xk9?file=/src/ListTest.tsx

Observed behavior:

When I expand a collapsed row and select on of the group rows then onRowSelectionModelChange fires and changes the state of the selectionModel, which will lead to a rerender which will result in the collapsing of all groups, what is not expected. This behavior changed from version 5 to 6. If I would change the onRowSelectionModelChange- handler to just console.log then the group will still be expanded.

Do you have any idea what may be wrong?

Kind regards,

Max

Your environment 🌎

Info

react: 18.2.0,
@mui/material: 5.13.4
@mui/lab: 5.0.0-alpha.133
@mui/material: 5.13.4
@mui/styles: 5.13.2
@mui/system: 5.13.2
@mui/x-data-grid-pro: 6.7.0
@mui/x-date-pickers: 6.7.0

System:
OS: Linux 5.19 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 21.24 GB / 31.05 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 14.17.1 - ~/.nvm/versions/node/v14.17.1/bin/node
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.1/bin/npm
Managers:
Apt: 2.4.9 - /usr/bin/apt
pip3: 22.2.2 - ~/anaconda3/bin/pip3
Utilities:
Make: 4.3 - /usr/bin/make
GCC: 11.3.0 - /usr/bin/gcc
Git: 2.34.1 - /usr/bin/git
IDEs:
Nano: 6.2 - /usr/bin/nano
Languages:
Bash: 5.1.16 - /usr/bin/bash
Java: 18.0.2-ea - /usr/bin/javac
Perl: 5.34.0 - /usr/bin/perl
Python: 3.9.13 - /home/max/anaconda3/bin/python
Python3: 3.9.13 - /home/max/anaconda3/bin/python3
Databases:
MySQL: 10.6.12 (MariaDB) - /usr/bin/mysql
SQLite: 3.39.3 - /home/max/anaconda3/bin/sqlite3
Browsers:
Chrome: 114.0.5735.106

Order ID or Support key 💳 (optional)

68359

Metadata

Metadata

Assignees

Labels

component: data gridThis is the name of the generic UI component, not the React module!docsImprovements or additions to the documentationfeature: Tree dataRelated to the data grid Tree data featureplan: ProImpact at least one Pro usersupport: commercialSupport request from paid users

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions