SfDropDownList timing error

I'm using the SfDropDownList, I have Enabled Virtualization and AllowFiltering, with > 1000 records in the dropdow.  I believe I'm running into a timing issue when the user types a search criteria and hits enter too quickly.


When the user types a word into the popup search bar and hits enter quickly, the OnValueSelect event fires first and selects the first item in the drop down list regardless of the search criteria.  After this value is selected, the Filtering event fires, but at this point it is too late as the first item in the list was already selected.  So filtering does not occur and the incorrect item is selected.  How can I correct this functionality?


1 Reply

PK Priyanka Karthikeyan Syncfusion Team February 3, 2025 12:02 PM UTC

Hi Zachary Witt,

 

Thank you for reaching out to us.

 

To quickly search the list and select the appropriate value by pressing Enter, you can use the DebounceDelay property for filtering. This allows you to set a delay (in milliseconds) before filtering takes effect, helping to reduce the frequency of filtering operations. This improves performance and responsiveness, providing a smoother user experience.

To implement this, you can enable the debounce feature as shown in the example below:

 

​<SfDropDownList TValue="string" TItem="Record" DebounceDelay="@NumericValue" AllowFiltering="true" Placeholder="e.g. Item 1" DataSource="@Records" Query="@LocalDataQuery" PopupHeight="130px" EnableVirtualization="true">
                   <DropDownListFieldSettings Text="Text" Value="Id"/>
               </SfDropDownList>
 @code{
    private int NumericValue = 30; //adjust the delay value as per your requirement
}

 

Sample: https://blazorplayground.syncfusion.com/LZLyZVXKThEPRESG

 

For more information about debounce concept, please refer the below reference

 

Documentation: https://blazor.syncfusion.com/documentation/dropdown-list/filtering#debounce-delay

 

Demos: https://blazor.syncfusion.com/demos/dropdown-list/filtering?theme=fluent2

 

API reference: DebounceDelay

 

 

Regards,

Priyanka K


Loader.
Up arrow icon