Welcome to the React feedback portal. We’re happy you’re here! If you have feedback on how to improve the React, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
I want to be able to define a grid where I specify the widths of all columns except one which will fill the remaining space but have a minimum width. I don't want that column to be 'auto' as I don't want it to size to the contents. The grid will fill the available parent space but will show a scrollbar if the available parent space is insufficient to fit the columns at their specified width, including the one with a minimum space set.
Unfortunately the minWidth property on a column seems to be ignored unless the width property is set to a value - if a column has minWidth set but no width set and the available space is smaller than the space for the other other columns then the minWidth-only-column is shrunk to have zero width.
I've modified one of your documentation samples to illustrate:
The Order ID column will shrink to nothing if the parent container is smaller than will fit the other columns (1500px as I've set the others to have width of 500) - so minWidth on the column is being ignored.
Looking at the HTML the generated COL element for the first column has no css set on it at all, so the column width service is just skipping setting on a width on it.
Curiously I found if I set a width property on that first column to a value smaller than minWidth, e.g. if I set it to '10', then the column width now actually gets set to minWidth - so it looks like the column width service is just erroneously ignoring the minWidth when a column has no width property.
Playing around with manually setting a 'min-width' style on that first COL element I found that seemed to work, so if there's some reason why the column width service can't calculate the width on a column that has a minWidth property set and no width property set then perhaps just setting the 'min-width' style on the COL element to the value could work? (The column model doesn't give me a way to set attributes of the column's COL element, so I can't set the style or even a css class on it through settings)