From 602753c7759de05468b8fff78aa58f58517272c2 Mon Sep 17 00:00:00 2001 From: bach Date: Mon, 1 Mar 2021 16:41:51 +0100 Subject: [PATCH] fixed searchform bug --- .../custom/materiotheme/vuejs/components/Form/SearchForm.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue b/web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue index eb2cb2b..a328a41 100644 --- a/web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue +++ b/web/themes/custom/materiotheme/vuejs/components/Form/SearchForm.vue @@ -37,10 +37,11 @@ export default { event.preventDefault(); console.log('autoCompleteSelect', event, ui); this.typed = ui.item.label + // we have to wait for typed watch to reset autocomplete before setting it setTimeout(function(){ console.log('update autocomplete value after settimeout'); this.autocomplete = ui.item.value - if(this.typed !== this.keys && this.autocomplete !== this.term){ + if(this.typed !== this.keys || this.autocomplete !== this.term){ this.submit() } }.bind(this), 1)