diff --git a/src/elements/clock/clock.ts b/src/elements/clock/clock.ts index 004e40cc82..080f16d0aa 100644 --- a/src/elements/clock/clock.ts +++ b/src/elements/clock/clock.ts @@ -87,11 +87,11 @@ class SbbClockElement extends LitElement { /** Callback function for minutes hand. */ private _moveMinutesHandFn = (): void => this._moveMinutesHand(); - protected override async willUpdate(changedProperties: PropertyValues): Promise { + protected override willUpdate(changedProperties: PropertyValues): void { super.willUpdate(changedProperties); if (!isServer && changedProperties.has('now')) { - await this._startOrConfigureClock(); + this._startOrConfigureClock(); } } diff --git a/src/elements/flip-card/flip-card-summary/flip-card-summary.ts b/src/elements/flip-card/flip-card-summary/flip-card-summary.ts index 25539dcb2b..af5c8ac6fb 100644 --- a/src/elements/flip-card/flip-card-summary/flip-card-summary.ts +++ b/src/elements/flip-card/flip-card-summary/flip-card-summary.ts @@ -26,10 +26,10 @@ class SbbFlipCardSummaryElement extends LitElement { @property({ attribute: 'image-alignment', reflect: true }) public accessor imageAlignment: SbbFlipCardImageAlignment = 'after'; - protected override willUpdate(_changedProperties: PropertyValues): void { - super.willUpdate(_changedProperties); + protected override willUpdate(changedProperties: PropertyValues): void { + super.willUpdate(changedProperties); - if (_changedProperties.has('imageAlignment')) { + if (changedProperties.has('imageAlignment')) { this.closest?.('sbb-flip-card')?.setAttribute('data-image-alignment', this.imageAlignment); } } diff --git a/src/elements/icon/icon.ts b/src/elements/icon/icon.ts index 3529d76c23..887e542af5 100644 --- a/src/elements/icon/icon.ts +++ b/src/elements/icon/icon.ts @@ -2,16 +2,15 @@ import { html, type PropertyValues, type TemplateResult } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; import { forceType, omitEmptyConverter } from '../core/decorators.js'; -import { SbbUpdateSchedulerMixin } from '../core/mixins.js'; import { SbbIconBase } from './icon-base.js'; /** - * It displays an icon loaded from a registered namespace. + * Displays an icon loaded from a registered namespace. */ export @customElement('sbb-icon') -class SbbIconElement extends SbbUpdateSchedulerMixin(SbbIconBase) { +class SbbIconElement extends SbbIconBase { /** * We need to additionally observe the svgicon attribute * for sbb-angular compatibility. @@ -56,13 +55,11 @@ class SbbIconElement extends SbbUpdateSchedulerMixin(SbbIconBase) { return super.fetchSvgIcon(namespace, name); } - protected override async willUpdate(changedProperties: PropertyValues): Promise { + protected override willUpdate(changedProperties: PropertyValues): void { super.willUpdate(changedProperties); if (changedProperties.has('name') && this.name) { - this.startUpdate(); - await this.loadSvgIcon(this.name); - this.completeUpdate(); + this.loadSvgIcon(this.name); } } diff --git a/src/elements/table/table-wrapper/table-wrapper.ts b/src/elements/table/table-wrapper/table-wrapper.ts index 9fae8faab4..addf2859b8 100644 --- a/src/elements/table/table-wrapper/table-wrapper.ts +++ b/src/elements/table/table-wrapper/table-wrapper.ts @@ -29,7 +29,7 @@ class SbbTableWrapperElement extends SbbNegativeMixin(LitElement) { }); private _tableWrapper!: HTMLElement; - protected override firstUpdated(changedProperties: PropertyValues): void { + protected override firstUpdated(changedProperties: PropertyValues): void { super.firstUpdated(changedProperties); this._tableWrapper = this.shadowRoot!.querySelector('.sbb-table-wrapper')!; this._resizeObserver.observe(this._tableWrapper);