Skip to content

Commit

Permalink
🐛 fix(DataTable): the selection and expansion column should not be so…
Browse files Browse the repository at this point in the history
…rtable (#2128)
  • Loading branch information
capdiem authored Sep 4, 2024
1 parent 533f2ce commit 2d64ba7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Masa.Blazor/Components/DataTable/MDataTable.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ public IEnumerable<DataTableHeader<TItem>> ComputedHeaders
{
Fixed = FixedSelect ? DataTableFixed.Left : DataTableFixed.None,
Width = "56px",
Value = "data-table-select"
Value = "data-table-select",
Sortable = false
});
}
else
{
var header = headers[index];
header.Sortable = false;
if (header.Width == null)
{
header.Width = "1px";
Expand All @@ -175,12 +177,14 @@ public IEnumerable<DataTableHeader<TItem>> ComputedHeaders
headers.Insert(0, new DataTableHeader<TItem>
{
Width = "1px",
Value = "data-table-expand"
Value = "data-table-expand",
Sortable = false
});
}
else
{
var header = headers[index];
header.Sortable = false;
if (header.Width == null)
{
header.Width = "1px";
Expand Down

0 comments on commit 2d64ba7

Please sign in to comment.