Autocomplete bug

Hello,

I'm experiencing a strange issue with the SfAutocomplete component. I have a "Manufacturer" field in my table, which is a foreign key. In the Add/Edit modes, I need to display the SfAutocomplete Manufacturer list. The Add mode works perfectly, but in Edit mode, the SfAutocomplete field fails to bind correctly.

When I use a simple approach with DataSource = ManufacturersList, everything works fine. However, when I implement SfDataManager for backend search, I encounter a problem: in Edit mode, the where clause in the data adaptor contains an ID with a value of null.

I have implemented the Filtering method, but the filtering method is not called in the first API call in edit mode, so ignore it.

DataManagerRequest->Where
Image_3111_1730891895804

Image_3684_1730891786045


1 Reply

UD UdhayaKumar Duraisamy Syncfusion Team November 7, 2024 07:59 AM UTC

The AutoComplete component only supports string data in its Value field, and it operates based on this field alone. In the provided code, the Value field is bound to a long data type, which leads to a null value during filtering since this data type is not supported by AutoComplete.
For your requirements, we recommend using the Blazor ComboBox component instead of the AutoComplete component. The Blazor ComboBox offers an editable dropdown list, allowing users to select options from a predefined list while supporting all data types, including long. It provides extensive features, such as data binding, filtering, grouping, cascading, customizable templates, and pop-up customization.
The ComboBox component filters data based on the Value field while displaying text based on the Text field, making it an ideal alternative to meet your needs.
For more details and examples, please refer to the following resources:


Loader.
Up arrow icon