mirror of
https://github.com/discourse/discourse.git
synced 2024-12-02 05:29:17 -06:00
DEV: allows groups-selector to have an onChangeCallback (#9399)
This commit is contained in:
parent
5ccbc5f3ee
commit
d891665ac5
@ -35,7 +35,12 @@ export default Component.extend({
|
|||||||
updateData: opts && opts.updateData ? opts.updateData : false,
|
updateData: opts && opts.updateData ? opts.updateData : false,
|
||||||
onChangeItems: items => {
|
onChangeItems: items => {
|
||||||
selectedGroups = items;
|
selectedGroups = items;
|
||||||
this.set("groupNames", items.join(","));
|
|
||||||
|
if (this.onChangeCallback) {
|
||||||
|
this.onChangeCallback(this.groupNames, selectedGroups);
|
||||||
|
} else {
|
||||||
|
this.set("groupNames", items.join(","));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
transformComplete: g => {
|
transformComplete: g => {
|
||||||
return g.name;
|
return g.name;
|
||||||
|
Loading…
Reference in New Issue
Block a user