ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Separate minWidth and maxWidth for dynamic column sizing

Open meyerds opened this issue 11 years ago • 2 comments

For columns whose width is '*' it would be useful to be able to specify a minWidth or maxWidth that applies only to the grid's automatic resizing algorithm. The existing minWidth and maxWIdth options still apply when manually resizing the column beyond the dynamic limits.

Example: I have a column containing variable length text data, the columnDef looks something like this: { field: 'name', type: 'string', width: '*', minWidth: 30, dynamicMinWidth: 60, //matches minWidth if undefined dynamicMaxWidth: 100, //matches maxWidth if undefined maxWidth: 150 }

In this example, I expect the data in the column will typically be between 60 and 100 pixels wide. I want the column to resize automatically based on the available space in the grid (existing behavior). But I want to limit the automatic resizing to the expected size range -- so that the available grid space is used efficiently based on the expected case.

I can do that today using standard minWidth & maxWidth, but I want to do it without limiting the user in the case of the unexpected (more than typical data) where you'd want to be able to manually resize the column.

meyerds avatar Aug 12 '15 22:08 meyerds

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 23 '18 03:05 stale[bot]

This issue has been automatically closed because it has not had recent activity. If you believe that this is still an issue in the latest version, feel free to re-open it. Thank you for your contributions.

stale[bot] avatar Jun 22 '18 04:06 stale[bot]