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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGrid] Text alignment is wrong #3668

Closed
2 tasks done
oliviertassinari opened this issue Jan 19, 2022 · 6 comments 路 Fixed by #3691
Closed
2 tasks done

[DataGrid] Text alignment is wrong #3668

oliviertassinari opened this issue Jan 19, 2022 · 6 comments 路 Fixed by #3691
Labels
bug 馃悰 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process design This is about UI or UX design, please involve a designer feature: Rendering layout Related to the data grid Rendering engine good first issue Great for first contributions. Enable to learn the contribution process. regression A bug, but worse

Comments

@oliviertassinari
Copy link
Member

oliviertassinari commented Jan 19, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 馃槸

The horizontal padding in the header is wrong:

Screenshot 2022-01-19 at 19 14 49

https://mui.com/components/data-grid/

Expected behavior 馃

Screenshot 2022-01-19 at 19 15 12

https://material.io/components/data-tables

It's done correctly in https://mui.com/components/tables/ and https://ant.design/components/table/

Steps to reproduce 馃暪

No response

Context 馃敠

It was raised by a designer on https://mui.zendesk.com/agent/tickets/2094. It's also related it #1623 (about the column resize style)

Your environment 馃寧

v5.2.2

Order ID 馃挸 (optional)

No response

@oliviertassinari oliviertassinari added bug 馃悰 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process regression A bug, but worse labels Jan 19, 2022
@oliviertassinari
Copy link
Member Author

It's a regression introduced in v4.0.0-alpha.29.

@wahajStar
Copy link

In datagridPro I resove in theme with css...
"&.MuiDataGrid-root .MuiDataGrid-columnHeaderTitleContainer": {padding:0}

@DanailH
Copy link
Member

DanailH commented Jan 21, 2022

@wahajStar would you be interested in doing a PR with the fix? This looks to be solution:

--- a/packages/grid/_modules_/grid/components/containers/GridRootStyles.ts
+++ b/packages/grid/_modules_/grid/components/containers/GridRootStyles.ts
@@ -114,7 +114,6 @@ export const GridRootStyles = styled('div', {
       flex: 1,
       whiteSpace: 'nowrap',
       overflow: 'hidden',
-      padding: '0 6px',
     },
     [`& .${gridClasses.sortIcon}, & .${gridClasses.filterIcon}`]: {
       fontSize: 'inherit',

@DanailH DanailH added the good first issue Great for first contributions. Enable to learn the contribution process. label Jan 21, 2022
@wahajStar
Copy link

Hello @DanailH Actually I am new in mui not getting PR.
how its work?

@DanailH
Copy link
Member

DanailH commented Jan 21, 2022

@wahajStar you can check the contribution guide for more info on how to open a PR https://github.com/mui-org/material-ui-x/blob/master/CONTRIBUTING.md

@wahajStar
Copy link

ok thanks

@flaviendelangle flaviendelangle changed the title [data-grid] Text alignment is wrong [DataGrid] Text alignment is wrong Jan 21, 2022
@oliviertassinari oliviertassinari added the feature: Rendering layout Related to the data grid Rendering engine label Jan 29, 2022
@oliviertassinari oliviertassinari added the design This is about UI or UX design, please involve a designer label Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 馃悰 Something doesn't work component: data grid This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process design This is about UI or UX design, please involve a designer feature: Rendering layout Related to the data grid Rendering engine good first issue Great for first contributions. Enable to learn the contribution process. regression A bug, but worse
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants