FIX: update tag-chooser & category-selector action (#24318)
This commit is contained in:
parent
10167ad8ee
commit
36ab7ff2a9
|
@ -94,9 +94,7 @@ export default MultiSelectComponent.extend({
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
onChange(values) {
|
onChange(values) {
|
||||||
this.attrs.onChange(
|
this.onChange(values.map((v) => Category.findById(v)).filter(Boolean));
|
||||||
values.map((v) => Category.findById(v)).filter(Boolean)
|
|
||||||
);
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -71,8 +71,8 @@ export default MultiSelectComponent.extend(TagsMixin, {
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
onChange(value, items) {
|
onChange(value, items) {
|
||||||
if (this.attrs.onChange) {
|
if (this.onChange) {
|
||||||
this.attrs.onChange(value, items);
|
this.onChange(value, items);
|
||||||
} else {
|
} else {
|
||||||
this.set("tags", value);
|
this.set("tags", value);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue