diff --git a/framework/core/js/src/admin/components/PermissionDropdown.js b/framework/core/js/src/admin/components/PermissionDropdown.js index 597e37b15..aa635d925 100644 --- a/framework/core/js/src/admin/components/PermissionDropdown.js +++ b/framework/core/js/src/admin/components/PermissionDropdown.js @@ -38,7 +38,6 @@ export default class PermissionDropdown extends Dropdown { attrs.className = 'PermissionDropdown'; attrs.buttonClassName = 'Button Button--text'; - attrs.lazyDraw = true; } view(vnode) { diff --git a/framework/core/js/src/admin/components/PermissionGrid.tsx b/framework/core/js/src/admin/components/PermissionGrid.tsx index 6044576b0..37741ff29 100644 --- a/framework/core/js/src/admin/components/PermissionGrid.tsx +++ b/framework/core/js/src/admin/components/PermissionGrid.tsx @@ -38,11 +38,13 @@ export default class PermissionGrid { return scopes.map((scope) => { + // This indicates the "permission" is a permission category, + // in which case we return an empty table cell. if ('children' in permission) { return ; } - return scope.render(permission); + return {scope.render(permission)}; }); }; @@ -416,7 +418,7 @@ export default class PermissionGrid { - const active = app.data.settings[this.attrs.key] === value; + const active = app.data.settings[this.attrs.setting] === value; return Button.component( { icon: active ? 'fas fa-check' : true, - onclick: saveSettings.bind(this, { [this.attrs.key]: value }), + onclick: saveSettings.bind(this, { [this.attrs.setting]: value }), active, }, label