diff --git a/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor b/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor
index 14c21655a8..059dc10414 100644
--- a/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor
+++ b/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor
@@ -14,13 +14,13 @@
StartNewSearchAsync(nameof(Criteria.SearchTerm)))"
Placeholder="Part of icon name..." />
StartNewSearchAsync(nameof(Criteria.Size)))"
Style="min-width: 100px;"
Items="@AllAvailableSizes"
OptionText="@(i => i > 0 ? $"Size{i}" : "[All]")" />
@@ -28,21 +28,21 @@
StartNewSearchAsync(nameof(Criteria.Variant)))"
Style="min-width: 100px;"
Items="@(Enum.GetValues())" />
StartNewSearchAsync(nameof(Criteria.Color)))"
Style="min-width: 100px;"
Items="@(Enum.GetValues().Where(i => i != Color.Custom))"
OptionValue="@(i => i.ToAttributeValue())" />
+ OnClick="@(() => StartNewSearchAsync(string.Empty))" />
diff --git a/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor.cs b/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor.cs
index 7d7c2f030e..06dd73a6a2 100644
--- a/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor.cs
+++ b/examples/Demo/AssetExplorer/Components/Pages/IconExplorer.razor.cs
@@ -42,8 +42,13 @@ protected override void OnInitialized()
}
}
- private async Task StartNewSearchAsync()
+ private async Task StartNewSearchAsync(string property)
{
+ if (property == nameof(Criteria.Variant) && Criteria.Variant == IconVariant.Light && Criteria.Size != 32)
+ {
+ Criteria.Size = 32;
+ }
+
SearchInProgress = true;
await Task.Delay(1); // Display spinner
@@ -71,7 +76,7 @@ private IEnumerable AllAvailableSizes
{
get
{
- var sizes = Enum.GetValues().Select(i => (int)i).ToList();
+ var sizes = Enum.GetValues().Where(i => i > 0).Select(i => (int)i).ToList();
var empty = new int[] { 0 };
return empty.Concat(sizes);
}