Skip to content
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] Is it possible to expand detail panel on row click or on any other columns #12004

Open
Tracked by #9328
niralivasoya opened this issue Feb 8, 2024 · 4 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: logic Logic customizability feature: Master-detail Related to the data grid Master-detail feature plan: Pro Impact at least one Pro user recipe

Comments

@niralivasoya
Copy link

niralivasoya commented Feb 8, 2024

Steps to reproduce

I want to expand and collapse the detail panel when we click on the full row or the name(column) of the row.

Current behavior

we can expand the detail panel when we click on the + icon.

image

Expected behavior

I want to expand and collapse the detail panel content when we click on the full row or on the name column (either).

Context

No response

Your environment

I am using the Brave browser. This is the version I have:
image

Search keywords: data grid, master detail, detail panel, data grid pro

@niralivasoya niralivasoya added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 8, 2024
@rajeshreddy-bheemireddy
Copy link

@niralivasoya I think we can customize the toggle using the toggleDetailPanel prop.
You can refer here to the closed issues.
Link
Hope this helps.

@cherniavskii
Copy link
Member

Hi @niralivasoya
Sure, it's possible.
Here's a working demo: https://stackblitz.com/edit/react-djm6e5?file=Demo.tsx

@cherniavskii
Copy link
Member

@michelengelen Should we add a recipe for this?

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! plan: Pro Impact at least one Pro user customization: logic Logic customizability feature: Master-detail Related to the data grid Master-detail feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 9, 2024
@github-project-automation github-project-automation bot moved this to 🆕 Needs refinement in MUI X Data Grid Feb 9, 2024
@michelengelen michelengelen changed the title Is it possible to expand detail panel on row click or on any other columns [data grid] Is it possible to expand detail panel on row click or on any other columns Feb 9, 2024
@niralivasoya
Copy link
Author

Thank you @cherniavskii for the working example. It is really helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! customization: logic Logic customizability feature: Master-detail Related to the data grid Master-detail feature plan: Pro Impact at least one Pro user recipe
Projects
Status: 🆕 Needs refinement
Development

No branches or pull requests

4 participants