DEV: allows groups-selector to have an onChangeCallback (#9399)

This commit is contained in:
Joffrey JAFFEUX 2020-04-09 21:57:06 +02:00 committed by GitHub
parent 5ccbc5f3ee
commit d891665ac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -35,7 +35,12 @@ export default Component.extend({
updateData: opts && opts.updateData ? opts.updateData : false,
onChangeItems: items => {
selectedGroups = items;
this.set("groupNames", items.join(","));
if (this.onChangeCallback) {
this.onChangeCallback(this.groupNames, selectedGroups);
} else {
this.set("groupNames", items.join(","));
}
},
transformComplete: g => {
return g.name;