Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>10.4.2</Version>
<Version>10.5.0-beta01</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ namespace BootstrapBlazor.Components;
/// </summary>
public class SelectSearchMetadata : StringSearchMetadata
{
/// <summary>
/// <para lang="zh">获得/设置 是否显示搜索框 默认 false 不显示</para>
/// <para lang="en">Gets or sets a value indicating whether to show the search box. Default is false.</para>
/// </summary>
public bool ShowSearch { get; set; }

/// <summary>
/// <para lang="zh">获得/设置 选择项集合</para>
/// <para lang="en">Gets or sets the collection of select items</para>
Expand Down
1 change: 1 addition & 0 deletions src/BootstrapBlazor/Extensions/ISearchItemExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ private void AddSelectSearchComponent(ISearchItem item, SelectSearchMetadata sel
builder.AddAttribute(60, nameof(Select<>.Items), selectSearchMetadata.Items);
builder.AddAttribute(70, nameof(Select<>.PlaceHolder), selectSearchMetadata.PlaceHolder);
builder.AddAttribute(80, nameof(Select<>.SkipValidate), true);
builder.AddAttribute(90, nameof(Select<>.ShowSearch), selectSearchMetadata.ShowSearch);
builder.CloseComponent();
}

Expand Down
1 change: 1 addition & 0 deletions test/UnitTest/Components/SearchFormItemMetadataTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ public void SelectSearchFormItemMetadata_Ok()
{
var meta = new SelectSearchMetadata()
{
ShowSearch = true,
Items = new List<SelectedItem>()
{
Comment on lines 108 to 112
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ShowSearch = true is set here but never asserted, so the test doesn't actually validate any behavior change (it only compiles). Consider asserting meta.ShowSearch (at minimum), or moving coverage to a bUnit render test (e.g., in SearchFormTest) that verifies the Select dropdown renders the search input when ShowSearch is enabled.

Copilot uses AI. Check for mistakes.
new SelectedItem("v1", "v1"),
Expand Down
Loading