From 624a3c093ea14fac9d67834fe0e4c396e8483985 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sun, 23 Mar 2025 15:33:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E7=A9=BA?= =?UTF-8?q?=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs index c59a459e7ba..cf4771c2ef1 100644 --- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs +++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor.cs @@ -251,7 +251,7 @@ private List GetItemsByVirtualize() for (int i = 0; i < values.Count; i++) { var text = i < texts.Count ? texts[i] : values[i]; - ret.Add(new SelectedItem(values[i], text)); + ret.Add(new SelectedItem(values[i].Trim(), text.Trim())); } return ret; } From f50f5f1b6f70f13e93ede424d4025a15d69ca0f0 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Sun, 23 Mar 2025 15:34:14 +0800 Subject: [PATCH 2/2] =?UTF-8?q?doc:=20=E6=9B=B4=E6=AD=A3=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/MultiSelects.razor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs index 2f93ec157b0..efd54b9ddca 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs @@ -148,7 +148,7 @@ private async Task> OnQueryAsync(VirtualizeQueryOption o } return new QueryData { - Items = items.Skip(option.StartIndex).Take(option.Count).Select(i => new SelectedItem(i.Name!, i.Name!)), + Items = items.Skip(option.StartIndex).Take(option.Count).Select(i => new SelectedItem(i.Id.ToString(), i.Name!)), TotalCount = items.Count }; }