-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Columns to have a fluid width #347
Comments
@amiranga What do you think about we use the flexbox model? Columns without the width property but flexbox would share. the same available, the higher the flexbox value is the more space it takes, like a barycenter and like flexbox implements it. |
Running into the same issue here.
This would definitely solve my issue. |
Ok, I did a little bit of research and I have a question regarding the ability to resize columns and this improvement. More specifically are we going to add the option to set PS. Not including this in the initial version will make delivering this faster. |
how do I set fixed datagrid width or atleast limit it to the sum of column widths?? |
@danielMugisha It's not clear to me. Could you detail the problem you are facing? Thanks. |
Is there an alternative approach to at least have the last column automatically fill the remaining width? |
Thank you @oliviertassinari ! |
hey @loopmode |
@amiranga did you find out the solution ? |
any solution for the same problem ? instead of adding flex prop to each column? |
I have a lot of columns and I want to show them all and allow horizontal scrolling I am trying to do that from a while "@mui/x-data-grid": "^5.11.0", any help would be appreciated |
Summary 💡
As the
data-grid
document says, By default, the columns have a width of 100 pixels. We can override it by using thewidth
property available inColDef
.Is there an option for columns to have a fluid width so that columns will get a proportion of the width of the container?
Examples 🌈
If my window width is 900px. The column with for 'id', 'username' and 'age' should be 300px each.
Columns should resize automatically when window width changes.
Motivation 🔦
In most of the table components, I have worked with, this is the default behavior. Is there a way to accomplish this using column props?? or should this be a new feature??
Benchmark
The text was updated successfully, but these errors were encountered: