diff --git a/addon/components/button.js b/addon/components/button.js index 1b5e1c7..9e04667 100644 --- a/addon/components/button.js +++ b/addon/components/button.js @@ -71,7 +71,7 @@ export default class ButtonComponent extends Component { constructor(owner, { permission = null, disabled = false, visible = true }) { super(...arguments); this.permissionRequired = permission; - this.visible = true; + this.visible = visible; if (!disabled) { this.disabledByPermission = permission && this.abilities.cannot(permission); } diff --git a/addon/components/dropdown-button.js b/addon/components/dropdown-button.js index ca8d693..f12474b 100644 --- a/addon/components/dropdown-button.js +++ b/addon/components/dropdown-button.js @@ -30,7 +30,7 @@ export default class DropdownButtonComponent extends Component { this.buttonComponentArgs = buttonComponentArgs; this.permissionRequired = permission; this.disabled = disabled; - this.visible = true; + this.visible = visible; // If no permissions disable if (!disabled) { this.disabled = this.doesntHavePermissions = permission && this.abilities.cannot(permission);