diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/SearchBox/BitSearchBoxDemo.razor b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/SearchBox/BitSearchBoxDemo.razor index 4987f349ed..4f43bc858a 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/SearchBox/BitSearchBoxDemo.razor +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/SearchBox/BitSearchBoxDemo.razor @@ -146,7 +146,7 @@ - +
Examples of BitSearchBox with suggestion list, including custom filtering, minimum trigger characters, and more.



diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs index 3ad5efc4c5..20c6ff884a 100644 --- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs +++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Shared/NavMenu.razor.cs @@ -31,12 +31,12 @@ public partial class NavMenu : IDisposable new() { Text = "Calendar", Url = "/components/calendar" }, new() { Text = "Checkbox", Url = "/components/checkbox", AdditionalUrls = ["/components/check-box"] }, new() { Text = "ChoiceGroup", Url = "/components/choicegroup", AdditionalUrls = ["/components/choice-group"], Description = "Radio, RadioButton" }, - new() { Text = "Dropdown", Url = "/components/dropdown", Description = "Select, MultiSelect, ComboBox" }, + new() { Text = "Dropdown", Url = "/components/dropdown", Description = "Select, MultiSelect, ComboBox", Data = "Chips" }, new() { Text = "FileUpload", Url = "/components/fileupload", AdditionalUrls = ["/components/file-upload"] }, new() { Text = "NumberField", Url = "/components/numberfield", AdditionalUrls = ["/components/numerictextfield", "/components/numeric-text-field"], Description = "NumberInput" }, new() { Text = "OtpInput", Url = "/components/otpinput", AdditionalUrls = ["/components/otp-input"] }, new() { Text = "Rating", Url = "/components/rating" }, - new() { Text = "SearchBox", Url = "/components/searchbox", AdditionalUrls = ["/components/search-box"] }, + new() { Text = "SearchBox", Url = "/components/searchbox", AdditionalUrls = ["/components/search-box"], Data = "AutoComplete" }, new() { Text = "Slider", Url = "/components/slider", Description = "Range" }, new() { Text = "SpinButton", Url = "/components/spinbutton", AdditionalUrls = ["/components/spin-button"] }, new() { Text = "TextField", Url = "/components/textfield", AdditionalUrls = ["/components/text-field"], Description = "TextInput" }, @@ -65,7 +65,7 @@ public partial class NavMenu : IDisposable new() { Text = "Header", Url = "/components/header" }, new() { Text = "Layout", Url = "/components/layout" }, new() { Text = "Spacer", Url = "/components/spacer" }, - new() { Text = "Stack", Url = "/components/stack" }, + new() { Text = "Stack", Url = "/components/stack", Description = "WrapPanel" }, ], }, new() @@ -201,7 +201,17 @@ private void HandleChange(string text) _filteredNavItems = _allNavItems; if (string.IsNullOrEmpty(text)) return; - _filteredNavItems = _flatNavItemList.FindAll(item => text.Split(' ').Where(t => t.HasValue()).Any(t => $"{item.Text} {item.Description}".Contains(t, StringComparison.InvariantCultureIgnoreCase))); + var mainItems = _flatNavItemList + .FindAll(item => text.Split(' ') + .Where(t => t.HasValue()) + .Any(t => $"{item.Text} {item.Description}".Contains(t, StringComparison.InvariantCultureIgnoreCase))); + + var subItems = _flatNavItemList + .FindAll(item => text.Split(' ') + .Where(t => t.HasValue()) + .Any(t => item.Data?.ToString()?.Contains(t, StringComparison.InvariantCultureIgnoreCase) ?? false)); + + _filteredNavItems = [.. mainItems, .. subItems]; } private async Task HandleOnItemClick(BitNavItem item)