Adds 500ms of debounce before searching for autocomplete and taginput.

This commit is contained in:
Mateus Machado Luna 2018-10-11 10:24:31 -03:00
parent a42ab64ebb
commit 0144084535
3 changed files with 6 additions and 6 deletions

View File

@ -98,7 +98,7 @@
});
this.selectedValues();
},
search( query ){
search: _.debounce( function(query) {
if (query != '') {
let promise = null;
this.options = [];
@ -117,7 +117,7 @@
} else {
this.cleanSearch();
}
},
}, 500),
selectedValues(){
const instance = this;
if ( !this.query || !this.query.metaquery || !Array.isArray( this.query.metaquery ) )

View File

@ -134,7 +134,7 @@
}
},
methods: {
search( query ){
search: _.debounce( function(query) {
let promise = null;
this.options = [];
let valuesToIgnore = [];
@ -155,7 +155,7 @@
.catch( error => {
this.$console.log('error select', error );
});
},
}, 500),
selectedValues(){
const instance = this;
if ( !this.query || !this.query.metaquery || !Array.isArray( this.query.metaquery ) )

View File

@ -124,7 +124,7 @@
}
},
methods: {
search( query ){
search: _.debounce( function(query) {
this.isLoading = true;
this.options = [];
@ -161,7 +161,7 @@
this.isLoading = false;
this.$console.log(error);
});
},
}, 500),
selectedValues( taxonomy ){
if ( !this.query || !this.query.taxquery || !Array.isArray( this.query.taxquery ) )
return false;