The Select2 plugin ( http://select2.imtqy.com/ ) allows you to filter <option> by its text.

How to filter data by data-attributes? Some information needs to be hidden from the user, but allow him to search for it, for example, the product barcode.

  • Apparently edit plugin core, not? - Jean-Claude
  • @ Jean-Claude would like something simpler - atom-22

1 answer 1

I would try to do something like this:

  1. In the method on the server that will give the filtered list , we filter by user input;
  2. The resulting data array in the previous paragraph is formed accordingly: we format the string that will be displayed to the user (we include only the information we want to show to the user), if necessary we glue it together .
  3. The data from the item is converted / converted to json and given to the client;