From 841e2ba723b01210c85cd1ee82f4a525685916bc Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 22 Mar 2018 18:11:47 +0100 Subject: [PATCH] FIX: prevents multiple search call when destroying multiple tags --- .../javascripts/select-kit/components/mini-tag-chooser.js.es6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 index 434c47b6954..74b93f106a1 100644 --- a/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 +++ b/app/assets/javascripts/select-kit/components/mini-tag-chooser.js.es6 @@ -169,7 +169,7 @@ export default ComboBox.extend(Tags, { destroyTags(tags) { tags = Ember.makeArray(tags); this.get("tags").removeObjects(tags); - this._prepareSearch(this.get("filter")); + this.set("searchDebounce", run.debounce(this, this._prepareSearch, this.get("filter"), 350)); }, didDeselect(tags) {