diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-04-17 14:06:29 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-04-17 21:22:47 +0200 |
commit | 068ab4130f196e5da64d3624c1ff46db557e432e (patch) | |
tree | 5d0c5825975884fda8a5986a18d15aa1fb6cf4fa /apps | |
parent | 8c87769b8d78fed534f90cad447d83d22af4047a (diff) | |
download | nextcloud-server-068ab4130f196e5da64d3624c1ff46db557e432e.tar.gz nextcloud-server-068ab4130f196e5da64d3624c1ff46db557e432e.zip |
fix(files): Ensure search query is cleared when changing view or directory
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/src/views/FilesList.vue | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index 382be3153a0..66c81714860 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -426,6 +426,7 @@ export default defineComponent({ logger.debug('View changed', { newView, oldView }) this.selectionStore.reset() + this.resetSearch() this.fetchContent() }, @@ -433,6 +434,7 @@ export default defineComponent({ logger.debug('Directory changed', { newDir, oldDir }) // TODO: preserve selection on browsing? this.selectionStore.reset() + this.resetSearch() this.fetchContent() // Scroll to top, force virtual scroller to re-render @@ -600,6 +602,14 @@ export default defineComponent({ console.debug('Files app handling search event from unified search...', searchEvent) this.filterText = searchEvent.query }, 500), + + /** + * Reset the search query + */ + resetSearch() { + this.filterText = '' + }, + openSharingSidebar() { if (!this.currentFolder) { logger.debug('No current folder found for opening sharing sidebar') |