Browse Source

fix(core): Subscribe to navigation changes on mounted for Unified search

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
tags/v29.0.0beta1
Ferdinand Thiessen 7 months ago
parent
commit
fca05f4613
No account linked to committer's email address

+ 4
- 2
core/src/views/UnifiedSearch.vue View File

@@ -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?.()
},

/**

+ 2
- 2
dist/core-unified-search.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/core-unified-search.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save