Reversed search in Select2 without using Ajax

-1

In DataTables.js the search works like this:

Product Name: Meias Vermelhas

The search returns the item if you type: Vermelhas Meias

How to have the same efficiency in Select2 searches?

Ref: link

    
asked by anonymous 10.05.2018 / 14:24

1 answer

0

In Select2 this feature does not exist natively and I did not have results doing manually, although I managed to, the performance was not legal.

While insisting on the search, I found an alternative that natively solved the problem, was lighter and resolved everything, selectize.js / a>

To understand an example of the result, see below:

Any typed term will be considered by the select search, regardless of the word order. This happens locally, within the select elements, without the need for an ajax query and the backend to handle.

    
24.05.2018 / 16:31