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] Grouped column duplicated in the filter's columns list #16085

Closed
stevenbriscoeca opened this issue Jan 6, 2025 · 3 comments
Closed
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Filtering Related to the data grid Filtering feature feature: Row grouping Related to the data grid Row grouping feature support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@stevenbriscoeca
Copy link

stevenbriscoeca commented Jan 6, 2025

Steps to reproduce

Steps:

  1. Open this link to live example: (MUI Doc)
  2. Go to section https://mui.com/x/react-data-grid/
  3. Group by Status
  4. Status appears twice in the list :

image
image

Current behavior

I see status appearing twice in the list

Expected behavior

The "grouped by" status should not appear twice in the list

Context

No response

Your environment

I am using the official documentation to see this bug

Search keywords: groupby filter duplicate

Order ID: 93983

@stevenbriscoeca stevenbriscoeca added bug 🐛 Something doesn't work status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 6, 2025
@github-actions github-actions bot added component: data grid This is the name of the generic UI component, not the React module! support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/ labels Jan 6, 2025
@arminmeh
Copy link
Contributor

arminmeh commented Jan 6, 2025

@stevenbriscoeca thanks for reporting the issue

I will create a PR with the fix.

Update:
This is actually an expected behavior.

Group column can be used as an additional column for filtering.
In the demo, group column values and the header name are the same as the column that is being grouped, but there are a couple of use cases where that might be different.

You can customize group column header name and/or value via groupingColDef prop

groupingColDef={{
  headerName: "Custom title",
  valueGetter: (params) => { ... },
}}

Filter panel will use the headerName in the Columns dropdown and use the return value from the valueGetter for filtering.

If you don't want to have both of these columns in the Columns dropdown, you can disable filtering for one of them.

Hope that this helps.

@arminmeh arminmeh added feature: Filtering Related to the data grid Filtering feature feature: Row grouping Related to the data grid Row grouping feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jan 6, 2025
@arminmeh arminmeh changed the title Grouped Column Automatically Added to Filter List causing a duplicate [data grid] Grouped column duplicated in the filter's columns list Jan 6, 2025
@arminmeh arminmeh added status: waiting for author Issue with insufficient information and removed bug 🐛 Something doesn't work labels Jan 7, 2025
@stevenbriscoeca
Copy link
Author

ok sounds good, as long as it's expected behavior and not a bug, i'll inform my team

@github-actions github-actions bot added status: waiting for maintainer These issues haven't been looked at yet by a maintainer and removed status: waiting for author Issue with insufficient information labels Jan 7, 2025
Copy link

github-actions bot commented Jan 7, 2025

This issue has been closed. If you have a similar problem but not exactly the same, please open a new issue.
Now, if you have additional information related to this issue or things that could help future readers, feel free to leave a comment.

Note

@stevenbriscoeca How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey.

@github-actions github-actions bot removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 7, 2025
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! feature: Filtering Related to the data grid Filtering feature feature: Row grouping Related to the data grid Row grouping feature support: premium standard Support request from a Premium standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

2 participants