-
-
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
[data grid] Is there a way to fix this right pin issue when using column grouping? #7041
Comments
It's a limitation of column grouping. It doesn't play well with column pinning. I added "waiting for 👍" to get votes from the community to know if we should prioritize this. |
up vote! this is an annoyng issue |
Is there a way to disable or remove "Pin to the right" in the meantime? |
With the new implementation of the column menu API released in v6, you can customize the custom pinning item in the I stripped off some logic from the default PinningItem to keep only Pin to Left part in this codesandbox example. For more examples of how to customize the column menu, see the documentation. Caution: |
Is there any way to fix this? I am facing the same issue. |
the same |
Hey, Any update on this? |
Hi in the same boat here. I am trying to use pinned columns with columns that do not belong to column groups. Here is another repro, https://codesandbox.io/s/icy-sun-fx7kdr?file=/Demo.tsx The issue happens when the "Age" column disappears after uncommenting out the pinnedColumns prop. The true error is that the pinned columns first row of the headers is too long, you can see it in the "data-fields" attribute, it has not just the pinned columns, but also the next ungrouped column. |
https://codesandbox.io/s/pinned-and-grouped-fix-vgdpxm?file=/Demo.tsx I manage a library that wraps this one for my company. I have spots where i add special fields to the columns defs and such, and i just figured out how to get around this. i made sure that any col def that had no grouping was given a "phantom" group definition on behalf of the user. feel free to adopt this code. if you dont want to center the column headers like i do in the demo, just remove the styled code |
Order ID 💳
51218
Duplicates
Latest version
The problem in depth 🔍
Weird behavior when pinning any column to the right under the last column group
Codesandbox straight from MUI's Defining Column Group demo
Screen.Recording.2022-11-24.at.6.01.11.PM.mov
Your environment 🌎
`npx @mui/envinfo`
The text was updated successfully, but these errors were encountered: