Dropdownlist hierachy filter options

I have a hierarchy of many records (more precisely, 1000) that I show in the drop-down list. Is there a way to filter this list using the keyup event from the select / option list?

<select id="food">
  <option>Foods</option>
  <option>&nbsp; Fruits</option>
  <option>&nbsp;&nbsp; Apple</option>
  <option>&nbsp; Vegetables</option>
  <option>&nbsp;&nbsp; Carrot </option>
</select>

Thanks, core.

+3
source share
1 answer

You might be able to use something like a jQuery autocomplete plugin:

http://www.pengoworks.com/workshop/jquery/autocomplete.htm

+2
source

Source: https://habr.com/ru/post/1744654/


All Articles