Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
ComboBox is freeze, when filter the value in to input after the select the item in list. This issue raised when we bound the observable collection for the component. But the same is working fine for the List collection.
@using System.Collections.ObjectModel
ObservableCollection
@cboValue1
TItem="string"
AllowFiltering="true"
FilterType="FilterType.Contains"
DataSource="@simpleList1"
Value="@cboValue1"
PopupWidth="auto"
ValueChanged="(s) => { cboValue1 = s; canFillEmpty1 = true; }">
TItem="string"
Filtering="filtering1" OnOpen="onOpen1" />
@code{
ObservableCollection
string cboValue1, cboValue2;
bool canFillEmpty1 = true;
SfComboBox
void filtering1(Syncfusion.Blazor.DropDowns.FilteringEventArgs e)
{
if (e.Text.Length > 2) // Only quey DB if 3 caracters or more
{
canFillEmpty1 = false;
// Query the database simulation
simpleList1.Clear();
for (int i = 0; i < 20; i++)
simpleList1.Add(e.Text + i.ToString("###"));
}
}
public Task onOpen1(Syncfusion.Blazor.DropDowns.BeforeOpenEventArgs args)
{
Task result = Task.CompletedTask;
if (canFillEmpty1)
{
canFillEmpty1 = false;
// Empty search DB query simulation, I don't want to fill this list before user press the drop down button.
simpleList1.Clear();
for (int i = 0; i < 20; i++)
simpleList1.Add("EMPTY" + i.ToString("###"));
}
return result;
}
}
Sample Link: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ComboBox_List_Observable_3098192055303884