diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-23 13:19:13 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-11-23 23:39:32 +0000 |
commit | 076abb661be7591bee7dee16c2e6b819c18bca08 (patch) | |
tree | 89a7b55d729cbc4b032613080cff5d129d7ec51d /core/src | |
parent | b092daa0f626c2a3a5d70a3914e0dead2e8f38e8 (diff) | |
download | nextcloud-server-076abb661be7591bee7dee16c2e6b819c18bca08.tar.gz nextcloud-server-076abb661be7591bee7dee16c2e6b819c18bca08.zip |
fix(core): Subscribe to navigation changes on mounted for Unified search
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 6 |
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?.() }, /** |