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" } ]; } 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 92f21500fce..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", @@ -3204,7 +3202,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..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": "时区下拉框", @@ -3204,7 +3202,8 @@ "SelectsGenericDesc": "

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

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

", "SelectsOnInputChangedCallback": "编辑模式下输入文本转换为对应 Value 回调方法", "TextConvertToValueCallback": "编辑模式下输入文本变化时回调方法", - "SelectsIsEditable": "是否可编辑" + "SelectsIsEditable": "是否可编辑", + "SelectsIsVirtualize": "是否开启虚拟滚动" }, "BootstrapBlazor.Server.Components.Samples.Sliders": { "SlidersTitle": "Slider 滑块", 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/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(); 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/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; 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/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; 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(); }); });