Hi András,
Greetings from Syncfusion support.
We have validated your query. The reported issue is occurred because of you have mapped fields property to AutoComplete that contains duplicate items to the value property. In AutoComplete the items must be unique. For your requirement we suggest you use ComboBox, instead of using AutoComplete. In ComboBox, we have text and value property. Also, it has the filtering support which is similar to AutoComplete. In the below example we have mapped Id to value API and Zipcode to text API.
Code example:
<ejs-combobox id="city" placeholder="Select a Zipcode" popupHeight="200px" dataSource="@ViewBag.data" change="onChange">
<e-combobox-fields groupBy="Category" value="Id" text="Zipcode"></e-combobox-fields>
</ejs-combobox>
public class City
{
public int Zipcode { get; set; }
public string Category { get; set; }
public string Id { get; set; }
public List<City> CityList()
{
List<City> city = new List<City>();
city.Add(new City { Zipcode = 7300, Category = "Mecsekpoloske", Id = "item1" });
city.Add(new City { Zipcode = 7300, Category = "Komlo", Id = "item2" });
return city;
}
} |
Please find the screenshot for your reference,
For your convenience we have prepared a sample. Please get it from the below link,
Regards,
Narayanasamy P.