From 7168625f213ad48595accd210ad5d82f151aa49b Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Mon, 19 Aug 2024 15:44:32 +0800 Subject: [PATCH] patched `visible` arg --- addon/components/button.js | 2 +- addon/components/dropdown-button.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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);