Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/Components/Table/Table.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ private void ResetTableColumns()
{
DisplayName = col.GetDisplayName(),
Name = col.GetFieldName(),
Width = col.Width,
Width = col.Fixed && !col.Width.HasValue ? DefaultFixedColumnWidth : col.Width,
Visible = col.GetVisible(_screenSize)
};

Expand Down
8 changes: 8 additions & 0 deletions test/UnitTest/Components/TableTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1845,6 +1845,14 @@ public void ColumnFixed_Ok(bool showExtendButton, bool isFixedHeader)

cut.Contains("left: 0px;");
cut.Contains("left: 200px;");
var columns = cut.FindAll("th");
var col = cut.FindAll("col");
if (columns[0].ClassName == "fixed")
{
var fixedWidth = cut.FindAll("col")[0].OuterHtml.Contains("width: 200px");
Assert.Equal("fixedWidth:True", $"fixedWidth:{fixedWidth}");
}

if (showExtendButton)
{
if (isFixedHeader)
Expand Down
Loading