Adds 500ms of debounce before searching for autocomplete and taginput.
This commit is contained in:
parent
a42ab64ebb
commit
0144084535
|
@ -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 ) )
|
||||
|
|
|
@ -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 ) )
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue