[FIX] Makes sur we always have a selectedGroup
This commit is contained in:
parent
55095bc44e
commit
9406eee179
|
@ -6,6 +6,11 @@ export default buildCategoryPanel('security', {
|
||||||
selectedGroup: null,
|
selectedGroup: null,
|
||||||
selectedPermission: null,
|
selectedPermission: null,
|
||||||
|
|
||||||
|
init() {
|
||||||
|
this._super();
|
||||||
|
this.set('selectedGroup', this.get('category.availableGroups.firstObject'));
|
||||||
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
editPermissions() {
|
editPermissions() {
|
||||||
if (!this.get('category.is_special')) {
|
if (!this.get('category.is_special')) {
|
||||||
|
@ -20,6 +25,8 @@ export default buildCategoryPanel('security', {
|
||||||
permission: PermissionType.create({ id: parseInt(id) })
|
permission: PermissionType.create({ id: parseInt(id) })
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.set('selectedGroup', this.get('category.availableGroups.firstObject'));
|
||||||
},
|
},
|
||||||
|
|
||||||
removePermission(permission) {
|
removePermission(permission) {
|
||||||
|
|
Loading…
Reference in New Issue