From 2d64ba710d706c9aa5f11690384e817e102b387d Mon Sep 17 00:00:00 2001 From: capdiem Date: Wed, 4 Sep 2024 09:26:29 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(DataTable):=20the=20selectio?= =?UTF-8?q?n=20and=20expansion=20column=20should=20not=20be=20sortable=20(?= =?UTF-8?q?#2128)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Masa.Blazor/Components/DataTable/MDataTable.razor.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Masa.Blazor/Components/DataTable/MDataTable.razor.cs b/src/Masa.Blazor/Components/DataTable/MDataTable.razor.cs index 4d10e70352..ef44a9db58 100644 --- a/src/Masa.Blazor/Components/DataTable/MDataTable.razor.cs +++ b/src/Masa.Blazor/Components/DataTable/MDataTable.razor.cs @@ -154,12 +154,14 @@ public IEnumerable> 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"; @@ -175,12 +177,14 @@ public IEnumerable> ComputedHeaders headers.Insert(0, new DataTableHeader { 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";