carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://carbon-for-ibm-products.netlify.app/
Apache License 2.0
89 stars 127 forks source link

[DataGrid]: Allow DataGrid column width to spread out responsively when minWidth or Width specified #4961

Open ShiriKremer opened 3 months ago

ShiriKremer commented 3 months ago

The problem

I am using the DataGrid component and want the columns to have min width / width but spread out responsively to the entire space available in the table (as in Carbon) and not hold their initial size (leaving much empty space to the right of them - as can be seen in the capture below)

https://github.com/carbon-design-system/ibm-products/assets/147585390/fa45e1dc-fdac-4633-b78d-c3950efb2852

The solution

Possible solutions:

  1. Be be able to pass to width non numeric content such as 20% (as regular width field can get) and have column spread out accordingly
  2. If minWidth specified and there is more space available, add space to these columns as the DataGrid area expands

Design link

No response

Links to other materials

No response

Owner/main maintainer(s)

Matt Gallo

Second/backup maintainer(s)

No response

Product/offering

Turbonomic

Business priority

None

Code of Conduct

elycheea commented 1 week ago

This issue has dependencies on https://github.com/carbon-design-system/ibm-products/issues/4977 but this would likely cause some major breaking changes so we likely won’t be able to pursue this until our next major version.