Change from `toLowerCase` => `toLocaleLowerCase`.

This now respects the locale of the string set and will lowercase it
respective of the character set rather than standard latin/English.
This commit is contained in:
Brock Whittaker 2017-04-24 12:15:32 -07:00 committed by Tim Abbott
parent 23df948457
commit 0ffdfa3699
1 changed files with 2 additions and 2 deletions

View File

@ -138,14 +138,14 @@ var list_render = (function () {
if (opts.filter.element) {
opts.filter.element.on(opts.filter.event || "input", function () {
var self = this;
var value = self.value.toLowerCase();
var value = self.value.toLocaleLowerCase();
meta.filtered_list = meta.list.filter(function (item) {
if (opts.filter.callback) {
return opts.filter.callback(item, value);
}
return !!item.toLowerCase().match(value);
return !!item.toLocaleLowerCase().match(value);
});
// clear and re-initialize the list with the newly filtered subset