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

[DataGrid] Add recipe showing how to toggle detail panels on row click #14666

Merged
merged 4 commits into from
Oct 16, 2024

Conversation

k-rajat19
Copy link
Contributor

@k-rajat19 k-rajat19 commented Sep 19, 2024

Fixes #7596

Preview

@mui-bot
Copy link

mui-bot commented Sep 19, 2024

@zannager zannager added the component: data grid This is the name of the generic UI component, not the React module! label Sep 19, 2024
@k-rajat19
Copy link
Contributor Author

@romgrk should we add this recipe? ^_^

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What caused this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably be caused while running some scripts, removed this change 👍

}));
}

const rows = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way to use one of the generated datasets? (employees or commodities)

Less lines of code is better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially, I tried to refactor all this but was unable to find a more concise way to do it
after seeing that same approach is used in other demos https://mui.com/x/react-data-grid/master-detail/
I ended up doing the same for this demo also.

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!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Show detail panel on onRowClick
4 participants