Combobox autocomplete functionallity

Greetings,

In a Blazor Server application, I use the ComboBox component to implement an autocomplete functionallity. The items of the Combobox are retrieved from a database (SQL Server) and assigned to a List, which is my Datasource for the ComboBox. Everything is working fine up to now but I have two questions that I could not answer by reading the documentation.

a) What are the possible advantages of using the AutoComplete component instead of the ComboBox?
b) The items I retrieve from the database and assign to the datasource List are over 200.000 records. Instead of retrieving all of them, is there a way to retrieve the items as the user types? So for each keystroke/character the user enters to perform a query to the db with that phrase? Wouldn't that be performant in terms of initial load time? 

Best Regards,
Sotiris


1 Reply

KP Kokila Poovendran Syncfusion Team January 4, 2024 05:57 AM UTC

Hi Sotiris,


Greetings from Syncfusion support!


Thank you for reaching out to us with your questions regarding the ComboBox in your Blazor Server application. I appreciate your detailed explanation of your current implementation. Let me address your queries:


a) What are the possible advantages of using the AutoComplete component instead of the ComboBox?


  • The ComboBox component supports both "value" and "Id" fields, whereas the AutoComplete component works solely based on the "value" field.
  • The AutoComplete component provides a matched suggestion list as the user types characters in the input. This allows for dynamic loading of data, improving performance by loading data only when necessary.


b) Instead of retrieving all of them, is there a way to retrieve the items as the user types?


Certainly! To achieve this, you can implement custom filtering as per your requirements. Syncfusion provides detailed documentation on custom filtering in the ComboBox. You can find the relevant information below: Custom Filtering Documentation : https://blazor.syncfusion.com/documentation/combobox/filtering#custom-filtering


We hope this information is helpful. If you have any further questions or need additional assistance, feel free to reach out.


Loader.
Up arrow icon