Skip to content

Commit

Permalink
fix alert test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcfranco committed Jan 15, 2025
1 parent a044e83 commit 88ac4ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/calcite-components/src/components/alert/alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ export class Alert extends LitElement implements OpenCloseComponent, LoadableCom
To account for this semantics change, the checks for (this.hasUpdated || value != defaultValue) was added in this method
Please refactor your code to reduce the need for this check.
Docs: https://qawebgis.esri.com/arcgis-components/?path=/docs/lumina-transition-from-stencil--docs#watching-for-property-changes */
if (changes.has("active") && (this.hasUpdated || this.active !== false)) {
this.handleActiveChange();
}

if (changes.has("open") && (this.hasUpdated || this.open !== false)) {
this.openHandler();
}

if (changes.has("active") && (this.hasUpdated || this.active !== false)) {
this.handleActiveChange();
}

if (
changes.has("autoCloseDuration") &&
(this.hasUpdated || this.autoCloseDuration !== "medium")
Expand Down Expand Up @@ -269,6 +269,7 @@ export class Alert extends LitElement implements OpenCloseComponent, LoadableCom
// #region Private Methods

private handleActiveChange(): void {
onToggleOpenCloseComponent(this);
this.clearAutoCloseTimeout();
if (this.active && this.autoClose && !this.autoCloseTimeoutId) {
this.initialOpenTime = Date.now();
Expand All @@ -280,7 +281,6 @@ export class Alert extends LitElement implements OpenCloseComponent, LoadableCom
}

private openHandler(): void {
onToggleOpenCloseComponent(this);
if (this.open) {
manager.registerElement(this.el);
} else {
Expand Down

0 comments on commit 88ac4ce

Please sign in to comment.