From 5260579d9721814f5d8d61580036625c3c804ca0 Mon Sep 17 00:00:00 2001 From: Jeri Peier Date: Tue, 5 Dec 2023 08:11:43 +0100 Subject: [PATCH] fix(sbb-toggle): calc pill position on hydration (#2259) --- src/components/toggle/toggle/toggle.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/toggle/toggle/toggle.ts b/src/components/toggle/toggle/toggle.ts index dfce67cde3..fda05f7955 100644 --- a/src/components/toggle/toggle/toggle.ts +++ b/src/components/toggle/toggle/toggle.ts @@ -185,6 +185,11 @@ export class SbbToggle extends LitElement { } } + protected override firstUpdated(changedProperties: PropertyValues): void { + super.firstUpdated(changedProperties); + this._setCheckedPillPosition(false); + } + public override disconnectedCallback(): void { super.disconnectedCallback(); this._toggleResizeObserver.disconnect();