From 5e519fe17a2d4940993f4d866dfdd68269265a12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Tue, 20 Oct 2020 13:58:01 +0200 Subject: [PATCH] Clear the input after adding a new share MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files_sharing/src/components/SharingInput.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/apps/files_sharing/src/components/SharingInput.vue b/apps/files_sharing/src/components/SharingInput.vue index 1f78a605c0..686e27379c 100644 --- a/apps/files_sharing/src/components/SharingInput.vue +++ b/apps/files_sharing/src/components/SharingInput.vue @@ -449,9 +449,6 @@ export default { return true } - // TODO: reset the search string when done - // https://github.com/shentao/vue-multiselect/issues/633 - // handle externalResults from OCA.Sharing.ShareSearch if (value.handler) { const share = await value.handler(this) @@ -494,6 +491,12 @@ export default { this.$emit('add:share', share) } + // reset the search string when done + // FIXME: https://github.com/shentao/vue-multiselect/issues/633 + if (this.$refs.multiselect?.$refs?.VueMultiselect?.search) { + this.$refs.multiselect.$refs.VueMultiselect.search = '' + } + await this.getRecommendations() } catch (error) { // focus back if any error