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

[question] How to column width contained content? #4648

Closed
2 tasks done
linojon opened this issue Apr 25, 2022 · 2 comments
Closed
2 tasks done

[question] How to column width contained content? #4648

linojon opened this issue Apr 25, 2022 · 2 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

@linojon
Copy link

linojon commented Apr 25, 2022

Order ID 💳

41465

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

The problem in depth 🔍

I'm having a lot of difficulty setting the column widths of my grid so the content of a cell doesnt get clipped. Is there a way to automatically adjust the widths to ensure existing content is not truncated?

Your environment 🌎

`npx @mui/envinfo`
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.
@linojon linojon added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Apr 25, 2022
@joserodolfofreitas
Copy link
Member

Hi @linojon,

If I understand your use case correctly, you could use the flex property like in the following example:
https://codesandbox.io/s/columnwidthgrid-material-demo-forked-l7z789?file=/demo.js

If that doesn't solve your case, would you mind setting up a codesandbox to explain your issue?

@joserodolfofreitas joserodolfofreitas added component: data grid This is the name of the generic UI component, not the React module! and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Apr 26, 2022
@m4theushw
Copy link
Member

This was not implemented yet. You can upvote #1241 What will be soon available is the ability to automatically adjust the row height to fit the content. This feature is being developed in #4859. The column widths still need to be provided but the content will not be clipped. I'll close this issue since there's already one asking for the same feature.

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

3 participants