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

[DataGrid] Free up column header space when icons are not visible #2606

Merged
merged 2 commits into from
Sep 21, 2021

Conversation

DanailH
Copy link
Member

@DanailH DanailH commented Sep 14, 2021

Based on this #2460

A small improvement that frees up column header space when column icons are not visible.

You can check Argos for more visual representation 😉

Before:
before

After:
after

@DanailH DanailH added component: data grid This is the name of the generic UI component, not the React module! new feature New feature or request labels Sep 14, 2021
@DanailH DanailH self-assigned this Sep 14, 2021
@@ -123,6 +127,8 @@ export const useStyles = makeStyles(
},
[`& .${gridClasses.iconButtonContainer}`]: {
display: 'flex',
visibility: 'hidden',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why to change the visibility if we have opacity: 0?

Copy link
Member Author

@DanailH DanailH Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the container. If I just have the width: 0 there might be cases where something can still be visible.
This opacity is for the items inside.

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! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants