(cp 82f6371) fixes #1315 filter on tags no longer cares about case

* searching "Pa" will find both "Pasta" and "pasta"
* the searched word can be "included" in the result, not only "starting with". "ta" will find "pasta".

Thanks to @dawsk-2021 in issue #1320
This commit is contained in:
plegall
2021-02-05 09:48:38 +01:00
parent fbb7e8ee69
commit 60a9314bff
+2 -2
View File
@@ -795,9 +795,9 @@ function isSearched(tagBox, stringSearch) {
}
function isDataSearched(tagObj) {
let name = tagObj.name;
let name = tagObj.name.toLowerCase();
let stringSearch = $("#search-tag .search-input").val();
if (name.startsWith(stringSearch.toLowerCase())) {
if (name.includes(stringSearch.toLowerCase())) {
return true;
} else {
return false;