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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] Manage group visibility #6651

Open
2 tasks done
yzhang250 opened this issue Oct 27, 2022 · 7 comments
Open
2 tasks done

[data grid] Manage group visibility #6651

yzhang250 opened this issue Oct 27, 2022 · 7 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! design This is about UI or UX design, please involve a designer linked in docs The issue is linked in the docs, so completely skew the upvotes waiting for 馃憤 Waiting for upvotes

Comments

@yzhang250
Copy link

yzhang250 commented Oct 27, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 馃挕

Hi there, my company (novartis) is using mui pro version and we are wondering when will the "Manage group visibility" feature available for data grid. That is a feature we are really interested in. And will there be a tool bar like a radio or selection box to select the groups the users want to show? Thanks!

Examples 馃寛

Screen.Recording.2023-06-24.at.14.17.01.mov

Motivation 馃敠

No response

Order ID 馃挸 (optional)

No response

@yzhang250 yzhang250 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 27, 2022
@zannager zannager 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 labels Oct 28, 2022
@m4theushw
Copy link
Member

Do you mean #5235? If yes, it's not yet in our roadmap for the next quarters. You can upvote #5235 to signal your interest in having it delivered sooner.

@m4theushw m4theushw removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Oct 28, 2022
@m4theushw m4theushw changed the title Manage group visibility [data grid] Manage group visibility Oct 28, 2022
@yzhang250
Copy link
Author

yzhang250 commented Oct 28, 2022 via email

@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented Oct 31, 2022

Is there a place to upvote it?

@yzhang250 Yes, this issue.

can we make a suggestion that has an explicit check box selection for column group visibility in the toolbar instead of a drop-down-like column button (shown below) in the toolbar? Our experience is that most of the users will not use it or even understand it.

We'll improve our "Manage Columns panel" to support this use case in the future.

@oliviertassinari oliviertassinari added waiting for 馃憤 Waiting for upvotes linked in docs The issue is linked in the docs, so completely skew the upvotes labels Jun 24, 2023
@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented Jun 28, 2023

If you need this feature before we officially implement it, there's an alternative way with a custom implementation.

It's a quick hack and can get complex if you're looking for a general solution, but it might give a hint at how to implement the feature in some specific use cases.
In the following live demo, I implemented a custom group header and used a React context to provide access to a column group map. This map holds the information if a column group is open or closed, and whenever this map is updated, it also updates the columns visibility model passed to the DataGrid.
https://codesandbox.io/s/custom-column-group-visibility-w8yw3w?file=/demo.tsx

You can find more information on how the customization of group headers works at:
https://mui.com/x/react-data-grid/column-groups/#customize-column-group

And you may also find useful the documentation on visibility:
https://mui.com/x/react-data-grid/column-visibility/

@joserodolfofreitas joserodolfofreitas removed the plan: Pro Impact at least one Pro user label Jun 28, 2023
@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 28, 2023

@joserodolfofreitas Very nice workaround 馃憣 . I'm not sure we need to build anything for it, or maybe this should be done as a plugin; I doubt many people would want to be forced to the bundle size for this feature when it can be almost perfectly implemented in userland. The only downside I can spot in this workaround is the lack of animation, but this is probably a different problem, one related to the column visibility changes

@oliviertassinari oliviertassinari added design This is about UI or UX design, please involve a designer and removed design: ux labels Aug 18, 2023
@Tarunaditya973
Copy link

Can we get filter option for a column group to show/hide columns? or do we already have it?

@hdale94
Copy link

hdale94 commented Mar 8, 2024

Can we get filter option for a column group to show/hide columns? or do we already have it?

This would be very useful, I can't find any info in the docs about it at the moment.

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! design This is about UI or UX design, please involve a designer linked in docs The issue is linked in the docs, so completely skew the upvotes waiting for 馃憤 Waiting for upvotes
Projects
None yet
Development

No branches or pull requests

8 participants