RadzenDropdown takes too long to filter List

65 Views Asked by At

I have a component that inherits RadzenDropDown, and sets a few properties on it, importantly AllowFiltering

public class ASDropdown<TValue> : RadzenDropDown<TValue>
{
    public ASDropdown() : base()
    {
        this.FilterDelay = 1;
        this.AllowClear = true;
        this.AllowFiltering = true;
        this.FilterCaseSensitivity = Radzen.FilterCaseSensitivity.CaseInsensitive;
        this.AllowVirtualization = true;
        this.TextProperty = "Name";
        this.ValueProperty = "Id";
    }
}

I then query data from my database in a view model, and pass it to the form as a List of DropdownItem

public class DropdownItem
{
    public Guid Id { get; set; }

    public string Name { get; set; } = "";
}

In my view model

// Items is populated with data before the form is rendered
public List<DropdownItem> Items { get; set; } = new();

public Guid SelectedItemId { get; set; }

On my form

<ASDropdown Data="ViewModel.Items"
            @bind-Value="ViewModel.SelectedItemId"/>

Everything works fine here, except when I search in the dropdown. It will freeze up, taking up to a minute just to filter a basic list. The problem is worse the more items are in the list. I don't see anyone complaining about this online, am I doing something wrong?

0

There are 0 best solutions below