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!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

2
Votes

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 simpleList1 = new ObservableCollection(); // This kind of collection works ok but can't clear the text

    string cboValue1, cboValue2;


    bool canFillEmpty1 = true;

    SfComboBox cbo1;


    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