From 7dcd0aeff26ade6a01594045c5fb8a95850b331c Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Sat, 5 Mar 2022 16:30:53 +0200 Subject: [PATCH] Fixed single-select combobox not showing rules errors --- app/imports/ui/components/global/SmartCombobox.vue | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/app/imports/ui/components/global/SmartCombobox.vue b/app/imports/ui/components/global/SmartCombobox.vue index 4679fbde..07931531 100644 --- a/app/imports/ui/components/global/SmartCombobox.vue +++ b/app/imports/ui/components/global/SmartCombobox.vue @@ -32,25 +32,21 @@ searchInput: '', }}, computed: { - // This component gets a longer default debounce time because it's all - // clicking no typing + // Multiple combobox gets a long default debounce time while single + // value gets a shorter one debounceTime() { if (Number.isFinite(this.debounce)){ return this.debounce; } else if (Number.isFinite(this.context.debounceTime)){ return this.context.debounceTime; } else { - return 1000; + return this.multiple ? 1000 : 100; } }, }, methods: { customChange(val){ - if (this.multiple){ - this.input(val); - } else { - this.change(val); - } + this.input(val); this.searchInput = ''; }, }