Slow response when clicking checkboxes in multi-select RadzenListBox. This is a phenomenon that occurs only the first time after starting the application, and the response is quick after the second time. This phenomenon occurs when the initial value is not selected. Doesn't happen if selected.
<div class="rz-p-sm-12 rz-text-align-center">
<RadzenListBox @bind-Value=@values Data=@products TextProperty="ProductName" ValueProperty="ProductID"
Multiple=true AllowClear=true Placeholder="Select products" Style="width: 100%; max-width: 400px; height: 200px" />
</div>
@code {
IEnumerable<int> values; //This phenomenon occurs when the initial value is not selected
//IEnumerable<int> values = new int[] { 1, 2 }; //Doesn't happen if selected.
IEnumerable<Product> products = new List<Product>
{
new Product
{
ProductName = "a",
ProductID = 1
},
new Product
{
ProductName = "b",
ProductID = 2
},
new Product
{
ProductName = "c",
ProductID = 3
},
new Product
{
ProductName = "d",
ProductID = 4
},
new Product
{
ProductName = "e",
ProductID = 5
},
new Product
{
ProductName = "f",
ProductID = 6
},
};
class Product
{
public string ProductName { get; set; }
public int ProductID { get; set; }
}
}