0

Im trying to use Jquery ui autocomplete, and im watching official site code.

https://jqueryui.com/autocomplete/#categories

It makes search 'label value' then show 'label value'and'category value',

but i want to switch like this.

"search 'category value' then show 'category value'and select 'label value'."

anyone know how to search autocomplete based category value?

i just tried to switch 'label' and 'category'

like this

{ label: "Products", category: "annhhx10" },
{ label: "Products", category: "annk K12" },

this was close solution for me but,'label'cant solve duplicate value like'category'. also'category' is unclickable.

please help thanks.

idotassadar
  • 35
  • 1
  • 5

1 Answers1

0

Thanks for help me. now i solved this problem.

I just found another solution from this topic.

Jquery UI Autocomplete: search from multiple attributes of one array

It's solution for "searches for matches from multiple attributes of array".

so this topic using 'desc' for search 'label'. I changed 'desc' to 'category' and it works fine.

Community
  • 1
  • 1
idotassadar
  • 35
  • 1
  • 5