diff --git a/src/components/alert/alert.tsx b/src/components/alert/alert.tsx index ba9996cc7..5dad701a4 100644 --- a/src/components/alert/alert.tsx +++ b/src/components/alert/alert.tsx @@ -23,7 +23,7 @@ const toastStack = Object.assign(document.createElement('div'), { className: 'sl export class Alert { alert: HTMLElement; autoHideTimeout: any; - isShowing = false; + isVisible = false; @Element() host: HTMLSlAlertElement; @@ -81,7 +81,7 @@ export class Alert { @Method() async show() { // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher - if (this.isShowing) { + if (this.isVisible) { return; } @@ -93,7 +93,7 @@ export class Alert { this.host.hidden = false; this.host.clientWidth; // force a reflow - this.isShowing = true; + this.isVisible = true; this.open = true; if (this.duration < Infinity) { @@ -105,7 +105,7 @@ export class Alert { @Method() async hide() { // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher - if (!this.isShowing) { + if (!this.isVisible) { return; } @@ -116,7 +116,7 @@ export class Alert { } clearTimeout(this.autoHideTimeout); - this.isShowing = false; + this.isVisible = false; this.open = false; } diff --git a/src/components/details/details.tsx b/src/components/details/details.tsx index 1372cbcef..c0a8c3fe4 100644 --- a/src/components/details/details.tsx +++ b/src/components/details/details.tsx @@ -27,7 +27,7 @@ export class Details { componentId = `details-${++id}`; details: HTMLElement; header: HTMLElement; - isShowing = false; + isVisible = false; /** Indicates whether or not the details is open. You can use this in lieu of the show/hide methods. */ @Prop({ mutable: true, reflect: true }) open = false; @@ -78,7 +78,7 @@ export class Details { @Method() async show() { // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher - if (this.isShowing) { + if (this.isVisible) { return; } @@ -98,7 +98,7 @@ export class Details { this.body.style.overflow = 'hidden'; } - this.isShowing = true; + this.isVisible = true; this.open = true; } @@ -106,7 +106,7 @@ export class Details { @Method() async hide() { // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher - if (!this.isShowing) { + if (!this.isVisible) { return; } @@ -125,7 +125,7 @@ export class Details { this.body.style.height = '0'; }); - this.isShowing = false; + this.isVisible = false; this.open = false; } diff --git a/src/components/dropdown/dropdown.tsx b/src/components/dropdown/dropdown.tsx index 6cb8f0c33..095b2bd60 100644 --- a/src/components/dropdown/dropdown.tsx +++ b/src/components/dropdown/dropdown.tsx @@ -23,7 +23,7 @@ let id = 0; }) export class Dropdown { componentId = `dropdown-${++id}`; - isShowing = false; + isVisible = false; panel: HTMLElement; positioner: HTMLElement; popover: Popover; @@ -145,7 +145,7 @@ export class Dropdown { @Method() async show() { // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher - if (this.isShowing) { + if (this.isVisible) { return; } @@ -160,7 +160,7 @@ export class Dropdown { document.addEventListener('keydown', this.handleDocumentKeyDown); document.addEventListener('mousedown', this.handleDocumentMouseDown); - this.isShowing = true; + this.isVisible = true; this.open = true; this.popover.show(); } @@ -169,7 +169,7 @@ export class Dropdown { @Method() async hide() { // Prevent subsequent calls to the method, whether manually or triggered by the `open` watcher - if (!this.isShowing) { + if (!this.isVisible) { return; } @@ -184,7 +184,7 @@ export class Dropdown { document.addEventListener('keydown', this.handleDocumentKeyDown); document.removeEventListener('mousedown', this.handleDocumentMouseDown); - this.isShowing = false; + this.isVisible = false; this.open = false; this.popover.hide(); }