From 686c0083e26c752f08b3a1d3e361646fc6cf39ba Mon Sep 17 00:00:00 2001 From: heartbeatLV Date: Wed, 27 Jan 2021 14:51:11 +0100 Subject: [PATCH] fix(search) by default filter the options when not lazy --- src/component/QsSelect.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/component/QsSelect.vue b/src/component/QsSelect.vue index 84120dd..8014681 100755 --- a/src/component/QsSelect.vue +++ b/src/component/QsSelect.vue @@ -270,9 +270,10 @@ export default { await this.prepareOptions() doneFn(() => { - const results = this.noClientSearch - ? this.opts - : this.opts.filter(this.searchFn(filter)) + const haveToSearch = this.noClientSearch ? false : !this.route + const results = haveToSearch + ? this.opts.filter(this.searchFn(filter)) + : this.opts this.setOptions(results) }) }