From 49dd4268614fb3bb371b114bac78672dce8cc455 Mon Sep 17 00:00:00 2001 From: Argo-AsicoTech Date: Fri, 13 Dec 2024 12:39:07 +0800 Subject: [PATCH 1/2] doc: update search document --- .../Components/Samples/Table/TablesSearch.razor.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Shared/Components/Samples/Table/TablesSearch.razor.cs b/src/BootstrapBlazor.Shared/Components/Samples/Table/TablesSearch.razor.cs index f3b0db8e8bf..c4eb115567d 100644 --- a/src/BootstrapBlazor.Shared/Components/Samples/Table/TablesSearch.razor.cs +++ b/src/BootstrapBlazor.Shared/Components/Samples/Table/TablesSearch.razor.cs @@ -148,8 +148,7 @@ private Task> OnQueryAsync(QueryPageOptions options) { // 使用内置扩展方法 ToFilter 获得过滤条件 // 目前 ToFilterFunc 无法解决大小写敏感问题 - // var items = Items.Where(options.ToFilterFunc()); - IEnumerable items = Items; + var items = Items.Where(options.ToFilterFunc()); if (!string.IsNullOrEmpty(options.SearchText)) { // 使用 Linq 处理 From daf266aa4cafc6079599f5927f716b54adb5b6b4 Mon Sep 17 00:00:00 2001 From: Argo-AsicoTech Date: Fri, 13 Dec 2024 12:54:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=20SelectedRo?= =?UTF-8?q?w?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/SelectGeneric/SelectGeneric.razor | 2 +- .../Components/SelectGeneric/SelectGeneric.razor.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor b/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor index 61db79a5116..cd5694609a8 100644 --- a/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor +++ b/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor @@ -22,7 +22,7 @@ } else { - + } diff --git a/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs b/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs index 50c23421481..7b544789455 100644 --- a/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs +++ b/src/BootstrapBlazor/Components/SelectGeneric/SelectGeneric.razor.cs @@ -277,7 +277,7 @@ private List> Rows } } - private SelectedItem? SelectedRow + private SelectedItem SelectedRow { get { @@ -286,7 +286,7 @@ private SelectedItem? SelectedRow } } - private SelectedItem? GetSelectedRow() + private SelectedItem GetSelectedRow() { var item = Rows.Find(i => Equals(i.Value, Value)) ?? Rows.Find(i => i.Active)