Replies: 1 comment 3 replies
-
|
I also have a need to have very small (only a single letter) columns and can't see how to do that. I'm attaching a screen shot of a portion of a table. (Rest of the table omitted for privacy issues). But hopefully you get the gist. Any help or advice from anyone would be greatly appreciated. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I can use the column
sizeprop to adjust column sizes relative to each other, and MRT uses some secret sauce to make the table look good at a lot of different screen widths. I was surprised to find out that -- unlike in other grids I've used --size,minSize, andmaxSizeare just suggestions, behaving more like aflex-growthanwidth, and that the actual rendered width is rarely equal tosize. But it turns out that this is usually what I want, because it scales well to lots of different screen widths.But sometimes I really do want a fixed-width column, and as far as I can tell I can't have one. The actions/expand/command columns are an obvious case; I don't want those to grow dynamically, ever. I also frequently design nested table layouts where some columns in the inner grid line up with columns in the outer grid (called aligned grids in AG Grid); I've done this with other grids, but it seems that it's impossible to do in MRT because I can't control the widths precisely enough. In general, the inability to precisely set a column width has been a real frustration.
Flexible relative sizing (what we have now) and fixed widths are both useful. Both MUI Datagrid and AG Grid, for instance, offer both
flexandwidthprops on the columns. I don't know of any datagrids besides MRT that don't support (fixed)width.How about adding a mechanism (perhaps migrating to the
flexandwidthpattern) that allows exact fixed widths?Beta Was this translation helpful? Give feedback.
All reactions