Skip to content

A platform for community discussion. Free, open, simple.

FIX: prevents multiple search call when destroying multiple tags

Joffrey JAFFEUX841e2ba723b0
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) {