From 75829de5b6c702ae156a6214c3ced8484ca0f0d1 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 15:03:13 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=20IsFixedSea?= =?UTF-8?q?rch=20=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/TreeViews.razor.cs | 3 --- src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs | 8 -------- 2 files changed, 11 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs index 9745d90689f..d1601e7a9f1 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor.cs @@ -3,9 +3,6 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using Microsoft.AspNetCore.Components.Rendering; -using Microsoft.AspNetCore.Components.Web; - namespace BootstrapBlazor.Server.Components.Samples; /// diff --git a/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs b/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs index 1bea8c3904a..912571355fb 100644 --- a/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs +++ b/src/BootstrapBlazor/Components/TreeView/TreeView.razor.cs @@ -3,7 +3,6 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using Microsoft.AspNetCore.Components.Web; using Microsoft.Extensions.Localization; namespace BootstrapBlazor.Components; @@ -15,7 +14,6 @@ namespace BootstrapBlazor.Components; public partial class TreeView : IModelEqualityComparer { private string? ClassString => CssBuilder.Default("tree-view") - .AddClass("is-fixed-search", ShowSearch && IsFixedSearch) .AddClassFromAttributes(AdditionalAttributes) .Build(); @@ -86,12 +84,6 @@ public partial class TreeView : IModelEqualityComparer [Parameter] public bool ShowSearch { get; set; } - /// - /// Gets or sets whether the search bar is fixed. Default is false. - /// - [Parameter] - public bool IsFixedSearch { get; set; } - /// /// Gets or sets whether to show the reset search button. Default is true. /// From 5c1646ff8149023ba8ac8b80d5ec58a7278f3ff9 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 15:05:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?test:=20=E6=9B=B4=E6=96=B0=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/UnitTest/Components/TreeViewTest.cs | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/UnitTest/Components/TreeViewTest.cs b/test/UnitTest/Components/TreeViewTest.cs index f48a97d9042..13b1d6a249a 100644 --- a/test/UnitTest/Components/TreeViewTest.cs +++ b/test/UnitTest/Components/TreeViewTest.cs @@ -3,8 +3,6 @@ // See the LICENSE file in the project root for more information. // Maintainer: Argo Zhang(argo@live.ca) Website: https://www.blazor.zone -using System.Threading.Tasks; - namespace UnitTest.Components; public class TreeViewTest : BootstrapBlazorTestBase @@ -1051,12 +1049,6 @@ public void ShowSearch_Ok() }); }); cut.Contains("search-template"); - - cut.SetParametersAndRender(pb => - { - pb.Add(a => a.IsFixedSearch, true); - }); - cut.Contains("is-fixed-search"); } [Fact]