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

Density is only working on the column header not rows #12481

Closed
lisaWriteJava opened this issue Mar 18, 2024 · 3 comments
Closed

Density is only working on the column header not rows #12481

lisaWriteJava opened this issue Mar 18, 2024 · 3 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! support: commercial Support request from paid users

Comments

@lisaWriteJava
Copy link

lisaWriteJava commented Mar 18, 2024

The problem in depth

The density was renamed to sized but when the it's changed it only changes the header not the rows.

This is a sandbox: https://codesandbox.io/p/sandbox/savingandapplystate-xtc493

Your environment

Chrome Browser

System:
OS: Linux 3.10 CentOS Linux 7 (Core)
Binaries:
Node: 16.20.0 - ~/.nvm/versions/node/v16.20.0/bin/node
npm: 7.24.2 - ~/node_modules/.bin/npm
pnpm: Not Found
Browsers:
Chrome: 120.0.6099.71
npmPackages:
@emotion/react: latest => 11.11.3
@emotion/styled: latest => 11.11.0
@mui/base: 5.0.0-beta.32
@mui/core-downloads-tracker: 5.15.5
@mui/icons-material: ^5.15.3 => 5.15.5
@mui/lab: ^5.0.0-alpha.159 => 5.0.0-alpha.161
@mui/material: ^5.15.3 => 5.15.5
@mui/private-theming: 5.15.5
@mui/styled-engine: 5.15.5
@mui/styles: ^5.15.3 => 5.15.5
@mui/system: 5.15.5
@mui/types: 7.2.13
@mui/utils: ^5.15.4 => 5.15.5
@mui/x-data-grid: 6.19.1
@mui/x-data-grid-generator: ^6.16.2 => 6.19.1
@mui/x-data-grid-premium: ^6.19.1 => 6.19.1
@mui/x-data-grid-pro: 6.19.1
@mui/x-license-pro: ^6.10.2 => 6.10.2
@types/react: 17.0.75
react: ^17.0.2 => 17.0.2
react-dom: ^17.0.2 => 17.0.2
styled-components: latest => 6.1.8

Search keywords: Density
Order ID: 66765

@lisaWriteJava lisaWriteJava added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Mar 18, 2024
@MBilalShafi
Copy link
Member

getRowHeight={() => 'auto'} overrides (takes precedence over) the rowHeight set by the density prop, because density is also essentially setting the rowHeight as mentioned here

Commenting out the mentioned line in your example makes the density work fine: https://codesandbox.io/p/sandbox/savingandapplystate-xtc493

Could that possibly work for you?

@MBilalShafi MBilalShafi added component: data grid This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 18, 2024
@lisaWriteJava
Copy link
Author

Yes. Absolutly perfect. Thank you.

Copy link

⚠️ This issue has been closed.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.

How did we do @lisaWriteJava?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Mar 18, 2024
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! support: commercial Support request from paid users
Projects
None yet
Development

No branches or pull requests

2 participants