trimmed query matching

This commit is contained in:
gabryon99 2020-10-29 11:37:26 +01:00
parent 85d6f58c0b
commit efb5c4f79d
3 changed files with 4 additions and 3 deletions

View file

@ -216,7 +216,8 @@
matcher: function (item) {
var text = this.displayText(item);
return ~text.toLowerCase().indexOf(this.query.toLowerCase());
// trim the final trailing spaces
return ~text.toLowerCase().indexOf(this.query.trimEnd().toLowerCase());
},
sorter: function (items) {