File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,6 @@ export function getColumnWidthForMeasurement<R, SR>(
2121 width : number | string ,
2222 { minWidth, maxWidth } : CalculatedColumn < R , SR >
2323) {
24- if ( width === 'max-content' || width === 'min-content' ) {
25- // TODO: how to handle minWidth and maxWidth?
26- return width ;
27- }
28-
2924 const widthWithUnit = typeof width === 'number' ? `${ width } px` : width ;
3025
3126 // don't break in Node.js (SSR) and jsdom
@@ -46,7 +41,10 @@ export function getColumnWidthForMeasurement<R, SR>(
4641 if (
4742 hasMaxWidth &&
4843 // ignore maxWidth if it less than minWidth
49- maxWidth >= minWidth
44+ maxWidth >= minWidth &&
45+ // we do not want to use minmax with max-content as it
46+ // can result in width being larger than max-content
47+ widthWithUnit !== 'max-content'
5048 ) {
5149 // We are setting maxWidth on the measuring cell but the browser only applies
5250 // it after all the widths are calculated. This results in left over space in some cases.
You can’t perform that action at this time.
0 commit comments