I am using jquery autocomplete on a label/value list of mobile phones:
[ { label: "Samsung Galaxy S7", value: "Samsung Galaxy S7"},
{ label: "Samsung Galaxy S6", value: "Samsung Galaxy S6"},
.....
]
I would like to perform a research without specifing the series name, i.e. if user types "Samsung S7" autocomplete suggests "Samsung Galaxy S7"
I tried to modify the source as follow:
[ { label: "Samsung Galaxy S7 Samsung S7", value: "Samsung Galaxy S7"},
{ label: "Samsung Galaxy S6 Samsung S6", value: "Samsung Galaxy S6"},
.....
]
This code works but it is ugly, because the autocomplete menu shows "Samsung Galaxy S6 Samsung S6" instead of a simple "Samsung Galaxy S6"
Is there a way to perform research on a property while showing in the menu a different one?