-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[DataGridPro] Allow to group rows based on column value #3277
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
These are the results for the performance tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs are looking very solid.
I've noticed just a couple details and I'm suggesting a single column as the first example because:
- it's a gentler introduction
- It doesnt replace the headerName with "Group" in contrast with the next example that does it. The explanation for this difference comes then right on the next section "Grouping Columns", which feels like a good introduction sequence.
👏 👏 👏 |
Closes #212
Docs preview
Feature summary
Use
props.experimentalFeatures.groupingColumns: true
to unlock the featureUse
props.groupingColumnsModel
/props.onGroupingColumnsModelChange
to controlUse
props.initialState.groupingColumns.model
to init (I did not store the model directly ininitialState.groupingColumns
because I feel like we will have additional stuff in this sub-state one day)Use the column menu to group / ungroup columns
Use
props.groupingColumnMode?: 'single' | 'multiple'
to create one grouping column with all the grouping criteria or one grouping column per grouping criteria (if you have an idea for a better name to avoid confusion with ourxxxMode?: 'client' | 'server'
. I don't want a boolean because AG-Grid has a 3rd mode with no grouping col and with a boolean we would be blocked)Use
props.groupingColDef.leafField
to render a column cell on the leafs of the grouping columnUse
props.disableGroupingColumns
to fully disable the featureUse
colDef.canBeGrouped: false
to block grouping on some columnsUse
colDef.keyGetter
to transform your cell value (postvalueGetter
) into a serializable valueChangelog
🚀 Introduce the grouping columns feature ([DataGridPro] Allow to group rows based on column value #3277) @flaviendelangle
Add GIF
Extracted pull requests
getValue
param for thevalueGetter
callback #3314fields
to the callback version ofgroupingColDef
#3316Shift
+Space
#3380Release note
🎁 Allow to group rows based on column values
To avoid future regression for users of the Pro plan, the feature needs to be explicitly activated using the rowGrouping experimental feature flag.
See the documentation for more details.