- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.2k
Multi-row headers/grouped headers #2684
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
Conversation
| @amanmahajan7 @nstepien Hi, do you guys plan to review/merge this PR in near future? Everybody would love this feature (including me/my team) | 
| @ekeuus Hi! We've tested column group. And I have a questions. Can ColumnGroup include renderer and class property? And is it possible to combine Columns and Columns groups in one columns DataGrid? | 
| 
 What is the use case of having the renderer? Only the child columns will have rendering needs, since the parent columns are just decorative. Or do you mean it for the first column on your picture? So that the cell contents can also be defined on the parent column? | 
| 
 Yes, sorry, maybe I wrote a little incomprehensibly | 
| 
 The first column at my screenshot now is the Column group with one FLC column, it is needed in this way because FLC Column stores different logic then other matrix column groups. And It's used as a tree And now we just don't pass the headerRenderer to the FLC column (in the screenshot) so as not to duplicate header names But FLC column component stores other logic, with redux, so anyway we need to pass it or inside Column Group, or not pass column group name, and stay like it was at my previous post. Also my question was about, maybe it somehow available to combine columns near column groups inside one columns DataGrid property Because now if we pass column and column groups it goes by the library inside the first column group (looks like it's not foreseen | 
| @ekeuus Hi, should I describe something more? Or maybe you need some demo? | 
| @ekeuus Hi again. Also we need to handle column groups collapse by click, so for that I need a custom headerRenderer for ColumnGroup | 
| @ekeuus Hi. Any updates? | 
| I don't think the maintainers care about this branch unfortunately so I am also not putting too much time into this at this current time. Doesn't seem like it would be merged anyway. | 
| 
 Understood, very sad to hear. It's much important feature I guess | 
| Can someone pls look into this. This is a must have feature , required for our team as well | 








Here is an MVP version of multi-level headers. I kept the initial types and structure from #2393.
I was not 100% sure how and if we want to also implement multi-level support. Maybe would be nice to first discuss how we should implement flattening of all of the levels. I did implement a ref-based method
flattenColumnGroupsthat goes through the whole tree and splits them up by level for easier access later.Also, I am not sure what to do if some of the columns are not grouped:
Parent 1 | Parent 2 |
Child 1 | Child 2 | Regular column 3
I propose we do not allow this via the types so that the code stays simpler. Implementing rowSpan for the header columns seems overkill, but if we do want it, it kind of defines the technical implementation.
screencast-localhost_6006-2021.10.06-15_49_27.mp4