optimize search input
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user