summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-04-17 14:06:29 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-04-18 00:55:21 +0200
commit986fd6e783f45067565fab853f2c4acab6c840c7 (patch)
tree976affb509eb0ca83c06532c635f34ec48ccd2bf /apps/files
parent053cb7455b270cd35d7797be6874abf7ffb6c22b (diff)
downloadnextcloud-server-986fd6e783f45067565fab853f2c4acab6c840c7.tar.gz
nextcloud-server-986fd6e783f45067565fab853f2c4acab6c840c7.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/files')
-rw-r--r--apps/files/src/views/FilesList.vue10
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')