-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[data grid] Autosize flex column #15232
Comments
@michelengelen. i'm trying resolve next: I think, it might be solved with new one property of GridAutosizeOptions, |
@A-Degtyarev I got what you are trying to do ... I just feel that it does not make that much sense, that's why I was asking what exact problem you are trying to solve here. Or to put it more specific: Why do the columns need to fit in the width of the data grid on first render? |
@michelengelen , I solved my task with ref, state and setting up flex:0 in new State: look at my example in the 1st post. |
It's still not making any sense to me why you have to do that, but ok. |
I don't think column autosizing not working with flex columns was intentional. @romgrk any objections to making autosizing work with flex columns? |
No objection. |
The problem in depth
Hi. I need to combine two behaviors:
flex: 1
property.apiRef.current.autosizeColumns
The main problem is impossibility of using flex and autosizeColumns: see example
Is there a way to combine two views: fit to screen (with rather large amount of columns), and autosize by content?
Your environment
`npx @mui/envinfo`
Search keywords: flex autosize width
Order ID: 94701
The text was updated successfully, but these errors were encountered: