diff --git a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj index b83c7643c0c..ec6cce29417 100644 --- a/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj +++ b/src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj @@ -31,7 +31,7 @@ - + diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor index 10a95513b25..2bc1eb30808 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor @@ -319,6 +319,12 @@ private enum MultiSelectEnumFoo +
+ + + + +
@@ -332,7 +338,8 @@ private enum MultiSelectEnumFoo
+ ShowSearch="_showSearch" ShowToolbar="_showToolbar" + IsFixedSearch="_isFixedSearch" IsClearable="_isClearable">
@@ -344,7 +351,8 @@ private enum MultiSelectEnumFoo
+ ShowSearch="_showSearch" ShowToolbar="_showToolbar" + IsFixedSearch="_isFixedSearch" IsClearable="_isClearable">
diff --git a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs index 6693409a337..20bf1a380cb 100644 --- a/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs +++ b/src/BootstrapBlazor.Server/Components/Samples/MultiSelects.razor.cs @@ -121,9 +121,10 @@ private enum MultiSelectEnumFoo private string? _editString; - private bool _isFixedSearch; - private bool _isClearable; - private bool _showSearch; + private bool _isFixedSearch = true; + private bool _isClearable = true; + private bool _showToolbar = true; + private bool _showSearch = true; private async Task OnEditCallback(string value) { @@ -373,6 +374,22 @@ private AttributeItem[] GetAttributes() => DefaultValue = "true" }, new() + { + Name = "ShowSearch", + Description = Localizer["MultiSelectsAttribute_ShowSearch"], + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" + }, + new() + { + Name = "IsFixedSearch", + Description = Localizer["MultiSelectsAttribute_IsFixedSearch"], + Type = "bool", + ValueList = "true|false", + DefaultValue = "false" + }, + new() { Name = "ShowToolbar", Description = Localizer["MultiSelectsAttribute_ShowToolbar"], diff --git a/src/BootstrapBlazor.Server/Locales/en-US.json b/src/BootstrapBlazor.Server/Locales/en-US.json index b2a1b5dc822..2ae4a679936 100644 --- a/src/BootstrapBlazor.Server/Locales/en-US.json +++ b/src/BootstrapBlazor.Server/Locales/en-US.json @@ -3024,7 +3024,12 @@ "MultiSelectOptionChangeLog": "Select the collection of items", "MultiSelectIsEditableTitle": "Editable", "MultiSelectIsEditableIntro": "Make the component editable by setting the IsEditable parameter", - "MultiSelectIsEditableDescription": "By setting the EditSubmitKey parameter, you can specify whether to submit via Enter or Space" + "MultiSelectIsEditableDescription": "By setting the EditSubmitKey parameter, you can specify whether to submit via Enter or Space", + "MultiSelectVirtualizeTitle": "Virtualize", + "MultiSelectVirtualizeIntro": "Set IsVirtualize to true enable virtual scroll for large data", + "MultiSelectVirtualizeDescription": "Component virtual scrolling supports two ways of providing data through Items or OnQueryAsync callback methods", + "MultiSelectsAttribute_ShowSearch": "Whether to display the search box", + "MultiSelectsAttribute_IsFixedSearch": "Whether fixed the search box" }, "BootstrapBlazor.Server.Components.Samples.Radios": { "RadiosTitle": "Radio", @@ -3193,7 +3198,7 @@ "SelectsIsEditableIntro": "By setting IsEditable=\"true\" to make the component editable", "SelectsIsEditableDesc": "After the editable function is enabled, if the input value is not in the candidate items, the new value can be returned through the TextConvertToValueCallback callback method, and the Items data source can be updated through the OnInputChangedCallback callback to prevent the input value from being lost after the page is refreshed.", "SelectsVirtualizeTitle": "Virtualize", - "SelectsVirtualizeIntro": "Set IsVirtualize to true enable virtual scroll for larg data", + "SelectsVirtualizeIntro": "Set IsVirtualize to true enable virtual scroll for large data", "SelectsVirtualizeDescription": "Component virtual scrolling supports two ways of providing data through Items or OnQueryAsync callback methods", "SelectsGenericTitle": "Generic", "SelectsGenericIntro": "Data source Items supports generics when using SelectedItem<TValue>", diff --git a/src/BootstrapBlazor.Server/Locales/zh-CN.json b/src/BootstrapBlazor.Server/Locales/zh-CN.json index fe1f214d8de..53de4fbb5ea 100644 --- a/src/BootstrapBlazor.Server/Locales/zh-CN.json +++ b/src/BootstrapBlazor.Server/Locales/zh-CN.json @@ -3024,7 +3024,12 @@ "MultiSelectOptionChangeLog": "选中项集合", "MultiSelectIsEditableTitle": "可编辑", "MultiSelectIsEditableIntro": "通过设置 IsEditable 参数,使组件可编辑", - "MultiSelectIsEditableDescription": "通过设置 EditSubmitKey 参数可以指定通过 Enter 还是 Space 进行提交" + "MultiSelectIsEditableDescription": "通过设置 EditSubmitKey 参数可以指定通过 Enter 还是 Space 进行提交", + "MultiSelectVirtualizeTitle": "虚拟滚动", + "MultiSelectVirtualizeIntro": "通过设置 IsVirtualize 参数开启组件虚拟功能特性", + "MultiSelectVirtualizeDescription": "组件虚拟滚动支持两种形式通过 Items 或者 OnQueryAsync 回调方法提供数据", + "MultiSelectsAttribute_ShowSearch": "是否显示搜索框", + "MultiSelectsAttribute_IsFixedSearch": "是否固定搜索栏" }, "BootstrapBlazor.Server.Components.Samples.Radios": { "RadiosTitle": "Radio 单选框", diff --git a/src/BootstrapBlazor/BootstrapBlazor.csproj b/src/BootstrapBlazor/BootstrapBlazor.csproj index 259def325b9..fc841e69e88 100644 --- a/src/BootstrapBlazor/BootstrapBlazor.csproj +++ b/src/BootstrapBlazor/BootstrapBlazor.csproj @@ -1,7 +1,7 @@  - 9.5.0-beta02 + 9.5.0-beta03 diff --git a/src/BootstrapBlazor/Components/Select/MultiSelect.razor b/src/BootstrapBlazor/Components/Select/MultiSelect.razor index 544c6b2e08e..dc4736af2bf 100644 --- a/src/BootstrapBlazor/Components/Select/MultiSelect.razor +++ b/src/BootstrapBlazor/Components/Select/MultiSelect.razor @@ -53,7 +53,7 @@ { } -
+
@if (ShowSearch) { } + @if (ShowToolbar) + { +
+ @if (ShowDefaultButtons) + { + @SelectAllText + @ReverseSelectText + @ClearText + } + @ButtonTemplate +
+ } @if (IsVirtualize) {