From 30a8f3397e8809234c530d470c1256a079340bc5 Mon Sep 17 00:00:00 2001 From: aspen Date: Wed, 10 Sep 2025 01:27:05 +1200 Subject: [PATCH] add searchTerm prop to receive search state from parent component; modify sortedItems so that it hides hidden items during normal browsing mode. --- src/components/LinkItems/Section.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/components/LinkItems/Section.vue b/src/components/LinkItems/Section.vue index f1659ed5..55cafc99 100644 --- a/src/components/LinkItems/Section.vue +++ b/src/components/LinkItems/Section.vue @@ -128,6 +128,7 @@ export default { widgets: Array, index: Number, isWide: Boolean, + searchTerm: String, }, components: { Collapsable, @@ -178,7 +179,14 @@ export default { }, /* If the sortBy attribute is specified, then return sorted data */ sortedItems() { - const items = [...this.items]; + // Filter out items with hidden: true, unless in edit mode or searching + let items = [...this.items]; + if (!this.isEditMode) { + // Include hidden items only when there's an active search term + if (!this.searchTerm || this.searchTerm.trim() === '') { + items = items.filter(item => !item.hidden); + } + } if (this.appConfig.disableSmartSort) return items; if (this.sortOrder === 'alphabetical') { return this.sortAlphabetically(items);