optimize search input

This commit is contained in:
Denis Savosin
2023-10-19 10:28:04 +03:00
parent 8a821c2a31
commit e888adb1c7
2 changed files with 15 additions and 12 deletions

View File

@@ -135,13 +135,13 @@ const HomeMixin = {
}
},
/* Returns true if there is more than 1 sub-result visible during searching */
checkIfResults() {
if (!this.sections) return false;
checkIfResults(sections) {
if (!sections) return false;
else {
let itemsFound = true;
this.sections.forEach((section) => {
sections.forEach((section) => {
if (section.widgets && section.widgets.length > 0) itemsFound = false;
if (this.filterTiles(section.items, this.searchValue).length > 0) itemsFound = false;
if (section.filteredItems.length > 0) itemsFound = false;
});
return itemsFound;
}