Limit search characters before making the search request
This commit is contained in:
parent
d038a93d65
commit
785b303166
1 changed files with 3 additions and 1 deletions
|
@ -39,7 +39,9 @@ export default {
|
|||
this.searchQuery = e.target.value;
|
||||
clearTimeout(this.debounce);
|
||||
this.debounce = setTimeout(async () => {
|
||||
this.$emit('search', this.searchQuery);
|
||||
if (this.searchQuery.length > 2) {
|
||||
this.$emit('search', this.searchQuery);
|
||||
}
|
||||
}, 500);
|
||||
},
|
||||
focusSearch(e) {
|
||||
|
|
Loading…
Reference in a new issue