From 91da36bae43c71ff3de9bc046c82ad9413b6b1b1 Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Mon, 17 Jun 2024 15:51:08 +0200 Subject: [PATCH] fix(files_sharing): bring global search in Sharing Input Signed-off-by: Grigorii K. Shartsev --- apps/files_sharing/src/components/SharingInput.vue | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index 376c67cc981..3ae86b8bf46 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -136,8 +136,20 @@ export default { }, methods: { - onSelected(option) { + async onSelected(option) { this.value = null // Reset selected option + + // Not a real option, but a lookup = global search button + if (option.lookup) { + await this.getSuggestions(this.query, true) + // Wait until select is re-rendered with new options + await this.$nextTick() + // Open the select again + this.$refs.select.$children[0].open = true + + return + } + this.openSharingDetails(option) },