Demonstrates virtualization in the BitDropdown component for handling large datasets efficiently.
diff --git a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Dropdown/_BitDropdownCustomDemo.razor.samples.cs b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Dropdown/_BitDropdownCustomDemo.razor.samples.cs
index e5c6357805..ca6627bbb7 100644
--- a/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Dropdown/_BitDropdownCustomDemo.razor.samples.cs
+++ b/src/BlazorUI/Demo/Client/Bit.BlazorUI.Demo.Client.Core/Pages/Components/Inputs/Dropdown/_BitDropdownCustomDemo.razor.samples.cs
@@ -810,7 +810,7 @@ public class Product
Value = { Selector = c => c.Value },
};";
- private readonly string example18RazorCode = @"
+ private readonly string example19RazorCode = @"
";
- private readonly string example18CsharpCode = @"
+ private readonly string example19CsharpCode = @"
public class Product
{
public string? Label { get; set; }
@@ -1333,6 +1333,103 @@ public class Product
};";
private readonly string example16RazorCode = @"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
";
+ private readonly string example16CsharpCode = @"
+public class Product
+{
+ public string? Label { get; set; }
+ public string? Key { get; set; }
+ public object? Payload { get; set; }
+ public bool Disabled { get; set; }
+ public bool Visible { get; set; } = true;
+ public BitDropdownItemType Type { get; set; } = BitDropdownItemType.Normal;
+ public string? Text { get; set; }
+ public string? Title { get; set; }
+ public string? Value { get; set; }
+}
+
+private List
GetBasicCustoms() => new()
+{
+ new() { Text = ""Fruits"", Type = BitDropdownItemType.Header },
+ new() { Text = ""Apple"", Value = ""f-app"" },
+ new() { Text = ""Banana"", Value = ""f-ban"" },
+ new() { Text = ""Orange"", Value = ""f-ora"", Disabled = true },
+ new() { Text = ""Grape"", Value = ""f-gra"" },
+ new() { Type = BitDropdownItemType.Divider },
+ new() { Text = ""Vegetables"", Type = BitDropdownItemType.Header },
+ new() { Text = ""Broccoli"", Value = ""v-bro"" },
+ new() { Text = ""Carrot"", Value = ""v-car"" },
+ new() { Text = ""Lettuce"", Value = ""v-let"" }
+};
+
+private BitDropdownNameSelectors nameSelectors = new()
+{
+ AriaLabel = { Selector = c => c.Label },
+ Id = { Selector = c => c.Key },
+ Data = { Selector = c => c.Payload },
+ IsEnabled = { Selector = c => c.Disabled is false },
+ IsHidden = { Selector = c => c.Visible is false },
+ ItemType = { Selector = c => c.Type },
+ Text = { Selector = c => c.Text },
+ Title = { Selector = c => c.Title },
+ Value = { Selector = c => c.Value },
+};";
+
+ private readonly string example17RazorCode = @"