A platform for community discussion. Free, open, simple.
FIX: update tag-chooser & category-selector action (#24318)
Kris36ab7ff2a95d
diff --git a/app/assets/javascripts/select-kit/addon/components/category-selector.js b/app/assets/javascripts/select-kit/addon/components/category-selector.jsindex a2fc25223af..ede830289f4 100644--- a/app/assets/javascripts/select-kit/addon/components/category-selector.js+++ b/app/assets/javascripts/select-kit/addon/components/category-selector.js@@ -94,9 +94,7 @@ export default MultiSelectComponent.extend({actions: {onChange(values) {- this.attrs.onChange(- values.map((v) => Category.findById(v)).filter(Boolean)- );+ this.onChange(values.map((v) => Category.findById(v)).filter(Boolean));return false;},},diff --git a/app/assets/javascripts/select-kit/addon/components/tag-chooser.js b/app/assets/javascripts/select-kit/addon/components/tag-chooser.jsindex ab02f7ada7f..ae3bfceee2f 100644--- a/app/assets/javascripts/select-kit/addon/components/tag-chooser.js+++ b/app/assets/javascripts/select-kit/addon/components/tag-chooser.js@@ -71,8 +71,8 @@ export default MultiSelectComponent.extend(TagsMixin, {actions: {onChange(value, items) {- if (this.attrs.onChange) {- this.attrs.onChange(value, items);+ if (this.onChange) {+ this.onChange(value, items);} else {this.set("tags", value);}