-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Conditional row grouping #14712
Comments
Hey @igortas You could use In https://codesandbox.io/p/sandbox/admiring-wind-sj64jg, I used it to stop grouping the movies belonging to the company Would that fulfill your requirement? |
Hi @MBilalShafi, Applying |
I'd love to see a live example to understand the pain points clearly, could you provide a minimal reproduction of the mentioned issue and the challenges with the current approach? Here's a guide on how to prepare one: https://mui.com/x/introduction/support/#bug-reproductions Thank you |
Hi @MBilalShafi The example u provide is half there, I have few things that premuim version of x grid don't support in way i need, so I need table like this (e.g documents and files for simplicity):
What I'm trying to do, or I need with mui x are this few things:
So in my simple scenario I have documents and files, first row is grouped, because it have two files, but currently other data in the document grouping rows I can't keep, nor pinned columns. On the otherside, second row I like not to be grouped, because no files exists for that document. Data comes in fashion like this:
Currently, there is no way in x grid, to express table like this. |
I tried to visualize your use case in this example: https://stackblitz.com/edit/react-y6ukuz?file=Demo.tsx It has a row with Is it close to what you are trying to achieve? If not, could you fork the example, try to reproduce the issue, and attach the updated example to be able to understand the issue better? |
Thanks @MBilalShafi Looks like I was missing all the time the What I don't like is that, Also, I like the first cell below grouping row to be empty. I'm facing this error:
|
Not sure if I follow this. Shouldn't row grouping work on some columns to begin with? If there's no column corresponding to the data values, how would the row grouping work?
You could do that by providing a custom grouping cell renderer.
Could you reproduce the error on top of the stackblitz demo I linked above or separately and share a live reproduction here? That way it will be easy to assess what the issue is. |
Search keywords
conditional grouping grid
Latest version
Summary
I expect I have option to dynamically set which rows I like to be grouped, and not all rows to be in grouped mode, but some of them I choose, or depending from some dynamic data.
So having grouping for all rows, looks terrible, when I expand the data, and I see empty rows, or worse, I need to so much preparation for my data, so I can hide the grouping row below, which also shows as nested children.
Examples
Motivation
Lacking of this option, I have issues implementing properly the feature(s) I need with conditional grouping data.
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: