diff --git a/src/classes/filter-types/autocomplete/Autocomplete.vue b/src/classes/filter-types/autocomplete/Autocomplete.vue index 0a07ef6d7..4b598b64e 100644 --- a/src/classes/filter-types/autocomplete/Autocomplete.vue +++ b/src/classes/filter-types/autocomplete/Autocomplete.vue @@ -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 ) ) diff --git a/src/classes/filter-types/taginput/Taginput.vue b/src/classes/filter-types/taginput/Taginput.vue index da4e2ba87..73f01de04 100644 --- a/src/classes/filter-types/taginput/Taginput.vue +++ b/src/classes/filter-types/taginput/Taginput.vue @@ -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 ) ) diff --git a/src/classes/filter-types/taxonomy/Taginput.vue b/src/classes/filter-types/taxonomy/Taginput.vue index 9f51c961c..94dbe6eaa 100644 --- a/src/classes/filter-types/taxonomy/Taginput.vue +++ b/src/classes/filter-types/taxonomy/Taginput.vue @@ -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;