Bootstrap-3-Typeahead icon indicating copy to clipboard operation
Bootstrap-3-Typeahead copied to clipboard

Accent Insensitive

Open bklups opened this issue 9 years ago • 1 comments

I try to adapt this : https://github.com/tcrosen/twitter-bootstrap-typeahead/issues/36 to Bootstrap-3-Typeahead. But i can not. Any solutions are welcome ;-)

bklups avatar Jun 25 '15 12:06 bklups

You can change this in source code:

    matcher: function (item) {
      var it = this.displayText(item);
      return ~it.toLowerCase().indexOf(this.query.toLowerCase();
    },

vs

    matcher: function (item) {
      var it = this.displayText(item);
      return ~it.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, "").indexOf(this.query.toLowerCase().normalize('NFD').replace(/[\u0300-\u036f]/g, ""));
    },

dinatih avatar May 11 '18 14:05 dinatih