From db696574f5b93d422407a5406c922e3613b3fbcd Mon Sep 17 00:00:00 2001 From: Thaum Rystra Date: Fri, 15 May 2020 15:09:34 +0200 Subject: [PATCH] Comboboxes now clear search text when selecting an option --- app/imports/ui/components/global/SmartCombobox.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/imports/ui/components/global/SmartCombobox.vue b/app/imports/ui/components/global/SmartCombobox.vue index 5852be5a..d9bcd679 100644 --- a/app/imports/ui/components/global/SmartCombobox.vue +++ b/app/imports/ui/components/global/SmartCombobox.vue @@ -5,8 +5,9 @@ :error-messages="errors" :value="safeValue" :menu-props="{auto: true, lazy: true}" + :search-input.sync="searchInput" box - @change="change" + @change="customChange" @focus="focused = true" @blur="focused = false" > @@ -22,5 +23,14 @@ export default { mixins: [SmartInput], + data(){ return { + searchInput: '', + }}, + methods: { + customChange(val){ + this.change(val); + this.searchInput = ''; + }, + } };