-
-
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
Pinned column transition to the non-pinned column. #9477
Comments
Is #7152 (comment) what you're looking for? |
@m4theushw Interesting, I will have another look. The best way here is to attach styles via DOM, not through useState and styled-components as it would make excess rerenders for the entire DataGrid. |
Did I get it right that we don't have an in-built feature because it contradicts material guidelines? |
Yes, we also don't usually add options to change the appearance of the elements. This is done via CSS. |
@m4theushw thank you, I think we can close the ticket then. |
We can add this demo to our docs |
@cherniavskii I guess "Recipe" section is a good candidate for the demo. |
Duplicates
Latest version
Summary 💡
Pinned columns allow us instantly see important information. But there're cases when we don't need to see columns pinned. For example, if we pinned the side column, i.e. from the left or from the right of the DataGrid. What if we unpin columns automatically when the place for the column that has been pinned is fully visible?
Let's say you have columns [a, b, c, d, e, f]. Columns "a" and "f" are pinned. Users see a horizontal scrollbar. Once you scroll to the farthest right point of the table, unpin column "f". Do the same if we scroll to the right.
Examples 🌈
I did the closest thing to what I have described but would like to have a native option that works exactly how I described.
I had to override shadow to completely remove it. When at the middle of the scroll it looks like that:
But then when you scroll right, it kind of looks like staying unpinned as the shadow is not displayed.
Motivation 🔦
The lack of this feature has affected us because we have limited space to display data in columns, even though the DataGrid occupies most of the screen (around 80-85% of the viewport width). When users pin three columns [a, b], and [f], they mistakenly believe there is more information and feel frustrated when they have to scroll unnecessarily. Implementing this feature would provide a clear and balanced user experience, allowing users to see pinned information when needed while maintaining a familiar table look.
Order ID 💳 (optional)
353fd166333c88df3b68ed5a6e922891Tz02ODU0NyxFPTE3MTgyNzY1NDU4ODksUz1wcm8sTE09c3Vic2NyaXB0aW9uLEtWPTI=
The text was updated successfully, but these errors were encountered: