Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

bootstrap-select: can one use accent insensitive searches?

I am using bootstrap-select for a form using data-live-search enabled, so that the user can both type the search term and find it in the dropdown. The dropdown list, however, has some terms with accents, like for example:

  • León
  • Castellón
  • Nájera

We'd like to make the search field in bootstrap-select accent-insensitive. Can it be done? I searched through the project's Github and didn't find anything, except for this issue:

https://github.com/silviomoreto/bootstrap-select/issues/767

And it's not clear to me whether it was finally implemented or what.

like image 704
PaulJ Avatar asked Nov 01 '15 17:11

PaulJ


1 Answers

You were in the right track, you only needed to see the attached tickets. There's an option for that, and was introduced because of that ticket. liveSearchNormalize is the option you are looking for, and it can be used in that way when initializing the selectpicker (liveSearchNormalize: true), or via data-attribute data-live-search-normalize="true"

like image 71
JGutierrezC Avatar answered Oct 31 '22 15:10

JGutierrezC