summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorAndy Scherzinger <info@andy-scherzinger.de>2023-11-24 09:38:49 +0100
committerGitHub <noreply@github.com>2023-11-24 09:38:49 +0100
commit36109fd26fc7f1531cda84044c6b3952c8d776f0 (patch)
tree69fa2f3429e1a5729964e7e306b2660148c11128 /core
parent0d478a0b9c749612d9ef508f0472582fa07d5574 (diff)
parent076abb661be7591bee7dee16c2e6b819c18bca08 (diff)
downloadnextcloud-server-36109fd26fc7f1531cda84044c6b3952c8d776f0.tar.gz
nextcloud-server-36109fd26fc7f1531cda84044c6b3952c8d776f0.zip
Merge pull request #41708 from nextcloud/backport/41687/stable28
[stable28] fix(core): Subscribe to navigation changes on mounted for Unified search
Diffstat (limited to 'core')
-rw-r--r--core/src/views/UnifiedSearch.vue6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue
index 0b7c9a29cec..3a136c501e9 100644
--- a/core/src/views/UnifiedSearch.vue
+++ b/core/src/views/UnifiedSearch.vue
@@ -334,7 +334,6 @@ export default {
},
async created() {
- subscribe('files:navigation:changed', this.onNavigationChange)
this.types = await getTypes()
this.logger.debug('Unified Search initialized with the following providers', this.types)
},
@@ -344,6 +343,9 @@ export default {
},
mounted() {
+ // subscribe in mounted, as onNavigationChange relys on $el
+ subscribe('files:navigation:changed', this.onNavigationChange)
+
if (OCP.Accessibility.disableKeyboardShortcuts()) {
return
}
@@ -383,7 +385,7 @@ export default {
},
onNavigationChange() {
- this.$el.querySelector('form[role="search"]').reset()
+ this.$el?.querySelector?.('form[role="search"]')?.reset?.()
},
/**