Is there a way to search for any matched letters in select2?
For example, if I have the following options:
<option value="MANGO">MANGO</option>
<option value="ORANGE">ORANGE</option>
<option value="APPLE">APPLE</option>
and if I type "mngo", is there a way to show "MANGO" option in the search result?
The regex is clear, it's adding a
.*
between each character and before and after all characters. You can change that wildcard as you please.I tried to be the less verbose possible, was tricky and fun doing this.