Skip to content

Commit 5f037b6

Browse files
Update components/DataTable/src/DataTable/DataTable.cs
Apply PR Feedback
1 parent e89df6e commit 5f037b6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

components/DataTable/src/DataTable/DataTable.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ protected override Size MeasureOverride(Size availableSize)
9595
// For now, we'll just use the header content as a guideline to see if things work.
9696

9797
// Avoid negative values when columns don't fit `availableSize`. Otherwise the `Size` constructor will throw.
98-
double width = availableSize.Width - fixedWidth - autoSized;
99-
width = Math.Max(width, 0);
100-
column.Measure(new Size(width, availableSize.Height));
98+
column.Measure(new Size(Math.Max(availableSize.Width - fixedWidth - autoSized, 0), availableSize.Height));
10199

102100
// Keep track of already 'allotted' space, use either the maximum child size (if we know it) or the header content
103101
autoSized += Math.Max(column.DesiredSize.Width, column.MaxChildDesiredWidth);

0 commit comments

Comments
 (0)