fixed searchform bug

This commit is contained in:
Bachir Soussi Chiadmi 2021-03-01 16:41:51 +01:00
parent 213a2be7b9
commit 602753c775
1 changed files with 2 additions and 1 deletions

View File

@ -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)