Skip to content

Commit c90685c

Browse files
committed
handle minWidth
1 parent a56574c commit c90685c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/utils/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export function getColumnWidthForMeasurement<R, SR>(
2828
return `max(${minWidth}px, ${width}px)`;
2929
}
3030

31+
const useMinMax = !width.includes('minmax') && !width.includes('fit-content');
32+
3133
if (
3234
maxWidth != null &&
3335
// ignore maxWidth if it less than minWidth
@@ -38,11 +40,15 @@ export function getColumnWidthForMeasurement<R, SR>(
3840
return width;
3941
}
4042

41-
if (!width.includes('minmax') && !width.includes('fit-content')) {
43+
if (useMinMax) {
4244
return `minmax(${width}, ${maxWidth}px)`;
4345
}
4446
}
4547

48+
if (useMinMax) {
49+
return `minmax(${minWidth}px, ${width})`;
50+
}
51+
4652
return width;
4753
}
4854

0 commit comments

Comments
 (0)