FIX: update tag-chooser & category-selector action (#24318)

This commit is contained in:
Kris 2023-11-09 18:05:02 -05:00 committed by GitHub
parent 10167ad8ee
commit 36ab7ff2a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -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;
},
},

View File

@ -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);
}