-
-
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
[DataGridPro] Add ability to set minimum / maximum resizable column width #1561
Comments
Also for the For now, for large screens, the Take a look 👀 My proposition is, to add a "minWidth" flag 🙌🏻 It should works perfect with |
@fnowacki your use case is different from the author. Still, I do agree that with the default width, it makes a lot of sense to reproduce the CSS layout model (but a subset that is compatible with virtualization). AG Grid has the same feature for both flexbox layout and resizing, but it's not obvious if it makes sense to merge the two concepts. One could argue that the default width shouldn't impact the capability of an end-user to adjust the width as he sees fit. |
We now have #1850 for the flexbox aspect of the min-width raised in this issue. For the resizing aspec, I would propose we close as "won't fix" as it seems a niche use case that harms end-users flexibility. But also happy to wait for more feedback. |
@oliviertassinari Cool 👍 Many thanks! |
With #2101, we have made the |
It is a duplicates of #2174, I am closing this one 👍 |
Actually, I'm reopening, this one is specifically about the resize feature, while #2174 is about the default layout. It's very similar, but it's not clear if the two states should be identical. |
But we could introduce new properties for people that want to distinguish the base |
Also interested in |
I would go the other way around an create |
That would introduce fewer breaking changes. How would this work if I wanted to allow full resizing, while setting a minimum flex width? I imagine like this:
|
Right now both flex process and resize process uses In your example, for me that grid would take 200px at init (or more if more flex space available). |
You're right, both approaches do not introduce BC. I was in the middle of editing my comment 😄 Either one would work for me.
|
😄 Too fast Yes I guess the best argument to do one or the other is : which one do we most often want to define without the other ? |
Another thought: if MUI ever decided to support other fluid column widths (maybe percentages?), then |
i've noticed that when using the rendercell function in data grid pro version with resizable columns the content will overlap with neighboring columns. this only happens with rendercell columns. normal columns work as expected. https://github.com/pomerium/pomerium-console/issues/2993 |
Following up after #347 and #566, I think it would be great to be able to set the minimum / maximum width of a column similarly to how the GridColDef allows the default width to be set.
Summary 💡
I could see two different ways this feature could be supported.
Motivation 🔦
Right now, I am trying to prevent users from being able to shrink the columns to the extent where the column headerName no longer appears. The following screenshot shows the two resizable columns being collapsed to the extent that the user cannot see the sorting icon.
https://material-ui.com/components/data-grid/columns/#resizing
The text was updated successfully, but these errors were encountered: