Closed turik97 closed 3 years ago
I made this simple filter to exclude items which are matched in the middle of a word and it works for me. It will match a string if it contains requested words (in the beginning or anywhere after a space)
function matchStringStart(string, line) { regex = new RegExp("(^| )" + string, 'giu'); if (line.match(regex) != null) return true; else return false; }
filter: function(item, displayKey) { if(matchStringStart(input.val(), displayKey)) return true; }
Is it possible to configure search to make it catch data when matches the request from the beginning of a string?