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] Implement Column groups #195

Closed
oliviertassinari opened this issue Aug 21, 2020 · 53 comments · Fixed by #5133
Closed

[data grid] Implement Column groups #195

oliviertassinari opened this issue Aug 21, 2020 · 53 comments · Fixed by #5133
Assignees
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 new feature New feature or request

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 21, 2020

Grouping columns allows you to have multiple levels of columns in your header and the ability, if needed, to 'open and close' column groups to show and hide additional columns.

Screenshot 2022-01-19 at 20 21 49

Benchamark


Column group collapse

@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request labels Aug 21, 2020
@oliviertassinari oliviertassinari changed the title [DataGrid] Implement column groups [DataGrid] Implement Column groups Sep 1, 2020
@oliviertassinari oliviertassinari added the linked in docs The issue is linked in the docs, so completely skew the upvotes label Nov 30, 2020
@Yrlish
Copy link

Yrlish commented Apr 13, 2021

Hi! Is there an update on this feature? Any roadmap goals or something? @oliviertassinari

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Apr 13, 2021

@Yrlish No plans for it yet. It's low on the priority list (upvotes).

@teneon

This comment has been minimized.

@michael-land

This comment has been minimized.

@manikandanhisto

This comment has been minimized.

@vietnguyen1992

This comment has been minimized.

@nadiia-kobylinska

This comment has been minimized.

@ezimon

This comment has been minimized.

@flaviendelangle
Copy link
Member

flaviendelangle commented Jan 25, 2022

This feature was less requested than others like #198, #212, #211 or #206.
So to be fully transparent, we did not plan to do it in Q1 2022.

But if there is a need from the community, we should be able to plan it for Q2 👍

@xiaoyu-tamu, we are only updating the public roadmap one quarter at a time, because we don't want to give false hope on features that will be developed further away in time.
We started doing major features again in Q4 after a long period of stabilization, starting with the one which felt the more urgent for a lot of users (#210, #212, #438, #211, #200 for instance). But clearly this one is being discussed and will be prioritized 👍

@ezimon
Copy link

ezimon commented Jan 25, 2022 via email

@tierneynr
Copy link

Also would love to see this feature added. Good to see it's prioritized

@manenigma
Copy link

I hope to see this feature as soon

@FlorianGG
Copy link

I hope it will be added soon

1 similar comment
@JuanesDanesAmerikanes
Copy link

I hope it will be added soon

@hnrq
Copy link

hnrq commented Mar 4, 2022

Is there any workaround for that now? Tried to customize Toolbar/Header, but horizontal scrolling doesn't work

@oliviertassinari oliviertassinari changed the title [DataGrid] Implement Column groups [data grid] Implement Column groups Mar 16, 2022
@iluvmemes
Copy link

@oliviertassinari is there any room for this on your upcoming features? I noticed that it has many more upvotes than some of the items viewable in the future on the public MUI X roadmap.

@flaviendelangle
Copy link
Member

I can add it to the Future column, it is clear that we are going to do it at some-point.
Given the traction around this feature, it is likely that we will start working on it on Q2, but we can't guarantee it yet.

@Gh0stscript
Copy link

Sad to see this hasn't been moved into the Q2 section on the road map. Looking at replacing the current data grid we're using, and your data grid would certainly seems it would be the best fit overall, and already covers majority of the current needs, with the exception of the ability of having grouped header columns - and as such keeping me on the fence.

Thought I certainly agree with the other features being prioritized, I do see this as being one of the vital core features a data grid should have, to avoid having to use excessively long column names when presenting certain types of data (E.g. shipper and receiver address information) to maintain a clear distinction to the user.

Is there any chance still that we might see this one included during Q2?

@joserodolfofreitas
Copy link
Member

Hi @Gh0stscript, as @flaviendelangle said, we cannot guarantee the delivery of this feature in Q2. That's why we decided not to add it to Q2's public roadmap. But given its popularity within the community, we do plan to work on it soon (please keep upvoting your favorite issues; it helps us a lot!).

We might be able to deliver it in Q2, and if not, it's happening at the beginning of Q3.

@yay
Copy link

yay commented Apr 19, 2022

We really need this at JP Morgan for our designs. I've been researching the features you have for the past few days and encouraged by the progress you've made in the recent months (really impressive!) but this is a deal breaker. I mean, how would we implement column grouping ourselves on top of what you have in a way that's not shoddy?

So we are now evaluating AG Grid and Ant Design table that both support this feature and still don't lack in the areas MUI grid is good at or recently became good at. We are currently using Material UI grid v4.0 and plenty of other Material UI components and would really love to keep it that way, even if using MUI DataGridPro requires a license.

@flaviendelangle
Copy link
Member

with sorting possible.

Do you need sorting on each child column or on the column group ?

@Bindeep
Copy link

Bindeep commented Jul 4, 2022

with sorting possible.

Do you need sorting on each child column or on the column group ?

Each child column.

@flaviendelangle
Copy link
Member

In that case there should be no problem with the implementation we are preparing 👍

@wahajStar

This comment was marked as off-topic.

@sahil-ag
Copy link

@mrpacman101, the PR to implement this feature is still on draft. But we'll likely ship it in a few weeks.

Would you mind sharing a bit more about your use cases? cc @juliusdanek @sahil-ag

Sorry for missing this comment.
We have some data in excel currently (we generate a report in Excel which is emailed) which has a ton of header merged cells (mostly information style cells). We are trying to move to UI pages. We were earlier using https://tanstack.com/table/v8/docs/examples/react/column-groups in our project, but facing some issues with CSS Integration within our pages.

@Bindeep

This comment was marked as off-topic.

@SergeOlabin

This comment was marked as off-topic.

@RapidSoftTecnologia

This comment was marked as off-topic.

@rajat1443
Copy link

Hey guys,
We are currently waiting for this issue. It's been hindering our development. Any updates on this? If not, can you suggest a workaround for the same??

@joserodolfofreitas
Copy link
Member

joserodolfofreitas commented Aug 3, 2022

The feature is under code review, and we'll likely launch it soon.
Please, feel free to check out our documentation preview to see the feature in action.

@sunilsr1986
Copy link

Thanks for this feature. Is there a way we could style the column group with specific classes, right now headerClassName is not getting applied for columnGroupingModel.

@sunilsr1986
Copy link

sunilsr1986 commented Aug 8, 2022

Like the background color is not possible now.
image

@alexfauquette
Copy link
Member

@sunilsr1986 Thanks for your feedback

The current implementation allows .MuiDataGrid-columnHeader--filledGroup and .MuiDataGrid-columnHeader--emptyGroup to target "group" and "empty group"
https://codesandbox.io/s/customizationdemo-demo-mui-x-forked-82dbps?file=/demo.tsx:2823-2860

I did not thought about the headerClassName which is a nice idea. I will add it to the properties of columnGroupingModel 👍

@sunilsr1986
Copy link

Thanks for the quick one and considering it. Ya right now I am managing with those two classes. Ya if the class names are added it would be nice to have each column group have it's own style / color. Please let us know if that's in. I can jump in to try that.

@alexfauquette
Copy link
Member

@sunilsr1986 Feature has been added. You can see it in action in the customization demo

@keemor
Copy link

keemor commented Aug 10, 2022

@alexfauquette Thanks for the effort & info

I checked on the latest version (5.15.1) but it's not there yet
https://codesandbox.io/s/basicgroupingdemo-demo-mui-x-forked-v3e6zs?file=/demo.tsx

image

@alexfauquette
Copy link
Member

@keemor As long as the PR is not merged it's not available on the released version.

Before releasing the feature, codesandbox generate a preview package from the PR, such that you can experiment with it before the release. This allows to share early feedbacks like the one about headerClassName

@sunilsr1986
Copy link

Just wondering the width doesn't match the sub header when we give flex 1
image

@sunilsr1986
Copy link

@alexfauquette
Copy link
Member

alexfauquette commented Aug 12, 2022

@sunilsr1986 I've been using the column width which by default is 100. To support flex properties I should use computedWidth. Now it's fix

@sunilsr1986
Copy link

sunilsr1986 commented Aug 15, 2022

Tested and it's working good. Thanks for that .. I have couple more involved. Could you please have a look with these as well ?

Tested package https://pkg.csb.dev/mui/mui-x/commit/2c5ff802/@mui/x-data-grid

@sunilsr1986
Copy link

sunilsr1986 commented Aug 15, 2022

  • When I do the table export I don't get the master header with the downloaded sheet. If you see in the attached screenshot it's missing the primary header.

image
It's supposed to be like below .
image

  • When I use the column selector and click on hide all .. I get this screen with the mentioned error .
    image
    image

@alexfauquette
Copy link
Member

alexfauquette commented Aug 15, 2022

@sunilsr1986 Yes, some features are missing from now and will be added one after the other. Here is the list of the one planned

  • export column group in excel
  • allows keyboard navigation in column groups
  • manage column visibility from the column group
  • allows reordering groups
  • allows resizing groups

Those features will be done in distinct commits such that we can have a detailed review of each of them, and not having them lost in the current PR.

If you see other feature interaction we missed, feel free to ask for them. I will create the issues when PR is merged

@soumyaa1804
Copy link

Hey, is this feature a commercial one? How to check that?

@Viicos
Copy link

Viicos commented Aug 17, 2022

Hey, is this feature a commercial one? How to check that?

@soumyaa1804 According to the documentation preview, it seems to be a free one.

@oliviertassinari oliviertassinari added design This is about UI or UX design, please involve a designer and removed design: ux labels Aug 18, 2023
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 new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.