File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
components/DataTable/src/DataTable Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,9 @@ protected override Size MeasureOverride(Size availableSize)
9393 // then invalidate the child arranges [don't re-measure and cause loop]...)
9494
9595 // For now, we'll just use the header content as a guideline to see if things work.
96- column . Measure ( new Size ( availableSize . Width - fixedWidth - autoSized , availableSize . Height ) ) ;
96+
97+ // Avoid negative values when columns don't fit `availableSize`. Otherwise the `Size` constructor will throw.
98+ column . Measure ( new Size ( Math . Max ( availableSize . Width - fixedWidth - autoSized , 0 ) , availableSize . Height ) ) ;
9799
98100 // Keep track of already 'allotted' space, use either the maximum child size (if we know it) or the header content
99101 autoSized += Math . Max ( column . DesiredSize . Width , column . MaxChildDesiredWidth ) ;
You can’t perform that action at this time.
0 commit comments