Hi.
Look for the code.
match: function (item, field, val) {
if (item.getField(field) == undefined || item.getField(field) == 'undefined') return null; // prevent error when the item do not had value on this field.
val = val.replace(/([^a-zA-Z0-9])/g, '\\$1'); // addslashes to all special characters.
return item.getField(field).match(new RegExp(val, 'i'));
}
Change it to.
match: function (item, field, val) {
if (item.getField(field) == undefined || item.getField(field) == 'undefined') return null; // prevent error when the item do not had value on this field.
val = val.replace(/([^a-zA-Z0-9 ])/g, '\\$1').toLowerCase(); // addslashes to all special characters.
let specialChar = {
'a':'(a|á|à|ả|ã|ạ|ă|ắ|ằ|ẵ|ặ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ|Ä|Å|Æ)'.toLowerCase(),
'o':'(o|ó|ò|ỏ|õ|ọ|ơ|ớ|ờ|ở|ợ|ỡ|ô|ố|ồ|ổ|ỗ|ộ|Ö|Ø)'.toLowerCase(),
'u':'(u|ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ự|ữ|Û|Ü)'.toLowerCase(),
'y':'(y|ý|ỳ|ỷ|ỹ|ỵ|ÿ)'.toLowerCase(),
'i':'(i|í|ì|ỉ|ĩ|ị|Î|Ï)'.toLowerCase(),
'e':'(e|é|è|ẻ|ẽ|ẹ|ê|ế|ề|ễ|ệ|ể|Ë)'.toLowerCase(),
'c':'(c|Ç)'.toLowerCase(),
'd':'(d|đ)'.toLowerCase(),
'n':'(n|Ñ)'.toLowerCase()
};
for (let x in specialChar) {
val = val.replace(new RegExp(x, 'g'), specialChar[x]);
}
let searchSTR = item.getField(field).toLowerCase();
return searchSTR.match(new RegExp(val, 'i'));
}