From 3de20df8c037f28d5233eecd441f74bd4365cba6 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 16:18:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E4=B8=8D?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E5=91=BD=E5=90=8D=E7=A9=BA=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/UnitTest/Components/SelectTest.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/UnitTest/Components/SelectTest.cs b/test/UnitTest/Components/SelectTest.cs index ff9f842ca16..c3956644435 100644 --- a/test/UnitTest/Components/SelectTest.cs +++ b/test/UnitTest/Components/SelectTest.cs @@ -6,9 +6,7 @@ using AngleSharp.Dom; using AngleSharp.Html.Dom; using Microsoft.AspNetCore.Components.Web.Virtualization; -using System.ComponentModel.DataAnnotations; using System.Reflection; -using System.Runtime.CompilerServices; namespace UnitTest.Components; From f3b0a20120c5bea9337e2fc86ae9eec3bcb074ab Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 16:30:45 +0800 Subject: [PATCH 2/6] =?UTF-8?q?refactor:=20=E5=BE=AE=E8=B0=83=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E5=9B=BE=E6=A0=87=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss b/src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss index 4b4f5402ae2..ceca09a679a 100644 --- a/src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss +++ b/src/BootstrapBlazor/wwwroot/scss/theme/bootstrapblazor.scss @@ -519,8 +519,8 @@ $bb-select-search-margin-bottom: .5rem; $bb-select-search-border-color: var(--bs-border-color); $bb-select-search-padding-right: 30px; $bb-select-search-icon-color: var(--bb-select-search-border-color); -$bb-select-search-icon-right: 20px; -$bb-select-search-icon-top: 17px; +$bb-select-search-icon-right: 26px; +$bb-select-search-icon-top: 19px; $bb-select-search-height: 52px; $bb-select-append-width: 30px; $bb-select-append-color: #c0c4cc; From 02aef8f312ed248ca240495c5f2ee72f5ee09655 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 18:53:06 +0800 Subject: [PATCH 3/6] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=E8=99=9A=E6=8B=9F?= =?UTF-8?q?=E5=8C=96=E5=8F=82=E6=95=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor.Server/Locales/en-US.json | 3 ++- src/BootstrapBlazor.Server/Locales/zh-CN.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 92f21500fce..25ac34363b1 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -3204,7 +3204,8 @@ "SelectsGenericDesc": "

Please refer to Design Ideas to understand this feature. In this example, by selecting the drop-down box option, the value obtained is the Foo instance, and the value displayed in the text box on the right is the Address value of the Foo attribute

In this example, the ValueEqualityComparer and CustomKeyAttribute parameters are not set, and the [Key] tag of the Id attribute of Foo is used for equality judgment

", "SelectsOnInputChangedCallback": "Callback method for converting input text into corresponding Value in edit mode", "TextConvertToValueCallback": "Callback method when input text changes in edit mode", - "SelectsIsEditable": "Whether editable" + "SelectsIsEditable": "Whether editable", + "SelectsIsVirtualize": "Wether to enable virtualize" }, "BootstrapBlazor.Server.Components.Samples.Sliders": { "SlidersTitle": "Slider", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 8eba1837aa8..38b7454b393 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -3204,7 +3204,8 @@ "SelectsGenericDesc": "

请参考 设计思路 理解此功能。本例中通过选择下拉框选项,得到的值为 Foo 实例,右侧文本框内显示值为 Foo 属性 Address

本例中未设置 ValueEqualityComparer 以及 CustomKeyAttribute 参数,使用 Foo 属性 Id[Key] 标签进行相等判定

", "SelectsOnInputChangedCallback": "编辑模式下输入文本转换为对应 Value 回调方法", "TextConvertToValueCallback": "编辑模式下输入文本变化时回调方法", - "SelectsIsEditable": "是否可编辑" + "SelectsIsEditable": "是否可编辑", + "SelectsIsVirtualize": "是否开启虚拟滚动" }, "BootstrapBlazor.Server.Components.Samples.Sliders": { "SlidersTitle": "Slider 滑块", From 2cf3452124d0d9bd8012704d5cca47cf808ec93e Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 18:53:17 +0800 Subject: [PATCH 4/6] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/MultiSelects.razor.cs | 8 ++++++++ .../Components/Samples/Selects.razor.cs | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs index 487e9f396d8..cc926bd65b0 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs @@ -474,6 +474,14 @@ private AttributeItem[] GetAttributes() => Type = "bool", ValueList = "true|false", DefaultValue = "false" + }, + new() + { + Name = nameof(MultiSelect.IsVirtualize), + Description = Localizer["MultiSelectsAttribute_IsVirtualize"], + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" } ]; } diff --git a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs index 808f941bf71..4eb82111198 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/Selects.razor.cs @@ -415,6 +415,14 @@ private AttributeItem[] GetAttributes() => Type = "bool", ValueList = "true|false", DefaultValue = "false" + }, + new() + { + Name = nameof(Select.IsVirtualize), + Description = Localizer["SelectsIsVirtualize"], + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" } ]; } From cdd419b61241d185f197771c193fa0c745cf82e2 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Wed, 19 Mar 2025 20:46:14 +0800 Subject: [PATCH 5/6] =?UTF-8?q?refactor:=20=E5=A2=9E=E5=8A=A0=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BootstrapBlazor/Components/Select/Select.razor.scss | 3 ++- src/BootstrapBlazor/Components/Select/SelectBase.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/BootstrapBlazor/Components/Select/Select.razor.scss b/src/BootstrapBlazor/Components/Select/Select.razor.scss index 4a71d7881aa..34ad39dd93d 100644 --- a/src/BootstrapBlazor/Components/Select/Select.razor.scss +++ b/src/BootstrapBlazor/Components/Select/Select.razor.scss @@ -121,7 +121,8 @@ transform: rotate(0); } -.select { +.select, +.auto-complete { .clear-icon { position: absolute; height: 100%; diff --git a/src/BootstrapBlazor/Components/Select/SelectBase.cs b/src/BootstrapBlazor/Components/Select/SelectBase.cs index ad4aa1c84d3..efacfbd4cf6 100644 --- a/src/BootstrapBlazor/Components/Select/SelectBase.cs +++ b/src/BootstrapBlazor/Components/Select/SelectBase.cs @@ -204,7 +204,7 @@ protected override void OnParametersSet() private bool IsNullable() => !ValueType.IsValueType || NullableUnderlyingType != null; /// - /// + /// Gets whether show the clear button. /// /// protected bool GetClearable() => IsClearable && !IsDisabled && IsNullable(); From 793aabb5c5a483695e0ea22071488b9625205f14 Mon Sep 17 00:00:00 2001 From: Argo Zhang Date: Thu, 20 Mar 2025 08:35:42 +0800 Subject: [PATCH 6/6] =?UTF-8?q?doc:=20=E7=A7=BB=E9=99=A4=20IsFixedSearch?= =?UTF-8?q?=20=E7=9B=B8=E5=85=B3=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/Samples/TreeViews.razor | 6 ------ src/BootstrapBlazor.Server/Locales/en-US.json | 4 +--- src/BootstrapBlazor.Server/Locales/zh-CN.json | 4 +--- src/BootstrapBlazor/Components/Filters/LookupFilter.razor | 4 ++-- src/BootstrapBlazor/Components/Select/SelectTree.razor | 1 - test/UnitTest/Components/InternalTableColumnTest.cs | 1 - test/UnitTest/Components/TableTest.cs | 1 - 7 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor index 53beb0200ca..9658df02d79 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/TreeViews.razor @@ -160,12 +160,6 @@ - - - - diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index 25ac34363b1..04fa69ff71f 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -694,8 +694,6 @@ "TreeViewShowSkeletonButtonText": "Asynchronous loading", "TreeViewShowSearchTitle": "Show search", "TreeViewShowSearchIntro": "By setting ShowSearch to display the search bar, and using the OnSearchAsync callback method to set the data source to refresh the page", - "TreeViewFixedSearchTitle": "Fixed search", - "TreeViewFixedSearchIntro": "The search bar can be fixed by setting IsFixedSearch=\"true\", and the search bar height can be set by the css variable --bb-tree-search-height", "TreeViewSetActiveTitle": "Set Active Node", "TreeViewSetActiveIntro": "Set the currently active node by calling the SetActiveItem method", "TreeViewSetActiveDisplayText": "Current Active Node", @@ -3164,7 +3162,7 @@ "SelectsCustomTemplateTitle": "Custom option templates", "SelectsCustomTemplateIntro": "By setting the ItemTemplate you can customize the option rendering style", "SelectsShowSearchTitle": "Drop-down box with search box", - "SelectsShowSearchIntro": "Controls whether the search box is displayed by setting the ShowSearch property, which is not displayed by default false. Fixed the search bar by setting IsFixedSearch", + "SelectsShowSearchIntro": "Controls whether the search box is displayed by setting the ShowSearch property, which is not displayed by default false", "SelectsConfirmSelectTitle": "Drop-down box with confirmation", "SelectsConfirmSelectIntro": "Block changes to the current value by setting the OnBeforeSelectedItemChange delegate.", "SelectsTimeZoneTitle": "Timezone", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index 38b7454b393..f457e614eb6 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -694,8 +694,6 @@ "TreeViewShowSkeletonButtonText": "异步加载", "TreeViewShowSearchTitle": "显示搜索栏", "TreeViewShowSearchIntro": "通过设置 ShowSearch 显示搜索栏,通过 OnSearchAsync 回调方法设置数据源刷新页面即可", - "TreeViewFixedSearchTitle": "固定搜索栏", - "TreeViewFixedSearchIntro": "通过设置 IsFixedSearch=\"true\" 固定搜索栏,可通过样式变量 --bb-tree-search-height 设定搜索栏高度", "TreeViewSetActiveTitle": "设置激活节点", "TreeViewSetActiveIntro": "通过调用 SetActiveItem 方法设置当前激活节点", "TreeViewSetActiveDisplayText": "当前激活节点", @@ -3164,7 +3162,7 @@ "SelectsCustomTemplateTitle": "自定义选项模板", "SelectsCustomTemplateIntro": "通过设置 ItemTemplate 可以自定义选项渲染样式", "SelectsShowSearchTitle": "带搜索框的下拉框", - "SelectsShowSearchIntro": "通过设置 ShowSearch 属性控制是否显示搜索框,默认为 false 不显示搜索框;通过设置 IsFixedSearch 固定搜索栏", + "SelectsShowSearchIntro": "通过设置 ShowSearch 属性控制是否显示搜索框,默认为 false 不显示搜索框", "SelectsConfirmSelectTitle": "带确认的下拉框", "SelectsConfirmSelectIntro": "通过设置 OnBeforeSelectedItemChange 委托,阻止当前值的改变", "SelectsTimeZoneTitle": "时区下拉框", diff --git a/src/BootstrapBlazor/Components/Filters/LookupFilter.razor b/src/BootstrapBlazor/Components/Filters/LookupFilter.razor index c4baa0705dc..9d089c46b8e 100644 --- a/src/BootstrapBlazor/Components/Filters/LookupFilter.razor +++ b/src/BootstrapBlazor/Components/Filters/LookupFilter.razor @@ -5,10 +5,10 @@ { if (IsHeaderRow) { - + } else { - + } } diff --git a/src/BootstrapBlazor/Components/Select/SelectTree.razor b/src/BootstrapBlazor/Components/Select/SelectTree.razor index 4e4e8941bd7..027c4325040 100644 --- a/src/BootstrapBlazor/Components/Select/SelectTree.razor +++ b/src/BootstrapBlazor/Components/Select/SelectTree.razor @@ -23,7 +23,6 @@ @if (!IsPopover) diff --git a/test/UnitTest/Components/InternalTableColumnTest.cs b/test/UnitTest/Components/InternalTableColumnTest.cs index 144ec6418da..1613b821d50 100644 --- a/test/UnitTest/Components/InternalTableColumnTest.cs +++ b/test/UnitTest/Components/InternalTableColumnTest.cs @@ -64,7 +64,6 @@ public void InternalTableColumn_Ok() SetValue("Order", 1); SetValue("Lookup", new SelectedItem[] { new("test", "Test") }); SetValue("ShowSearchWhenSelect", true); - SetValue("IsFixedSearchWhenSelect", true); SetValue("IsPopover", true); SetValue("LookupStringComparison", StringComparison.Ordinal); SetValue("LookupServiceKey", "Test"); diff --git a/test/UnitTest/Components/TableTest.cs b/test/UnitTest/Components/TableTest.cs index 8fed174b7f6..54527fb6684 100644 --- a/test/UnitTest/Components/TableTest.cs +++ b/test/UnitTest/Components/TableTest.cs @@ -5010,7 +5010,6 @@ public void TableColumn_Property() builder.AddAttribute(31, "IsVisibleWhenAdd", false); builder.AddAttribute(32, "IsVisibleWhenEdit", false); builder.AddAttribute(33, "LookupService", new FooLookupService()); - builder.AddAttribute(34, "IsFixedSearchWhenSelect", true); builder.CloseComponent(); }); });