diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-06-27 00:00:53 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-06-27 12:13:14 +0200 |
commit | 362c6238fcadb74c54c2a8c7b2c12c5a1011c0b5 (patch) | |
tree | 788796ae091291c2753905616f6a6db3aaa02464 /core | |
parent | dd3dcf37039ed969b1a2f6b89941a65ccf73b696 (diff) | |
download | nextcloud-server-362c6238fcadb74c54c2a8c7b2c12c5a1011c0b5.tar.gz nextcloud-server-362c6238fcadb74c54c2a8c7b2c12c5a1011c0b5.zip |
fix: Allow to reset unified search using the `nextcloud:unified-search:reset` event
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'core')
-rw-r--r-- | core/src/views/UnifiedSearch.vue | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/views/UnifiedSearch.vue b/core/src/views/UnifiedSearch.vue index 1f0f91cc5fe..a07860c7e79 100644 --- a/core/src/views/UnifiedSearch.vue +++ b/core/src/views/UnifiedSearch.vue @@ -99,6 +99,12 @@ export default defineComponent({ // register keyboard listener for search shortcut window.addEventListener('keydown', this.onKeyDown) + // Allow external reset of the search / close local search + subscribe('nextcloud:unified-search:reset', () => { + this.showLocalSearch = false + this.queryText = '' + }) + // Deprecated events to be removed subscribe('nextcloud:unified-search:reset', () => { emit('nextcloud:unified-search.reset', { query: '' }) |