Skip to content

Commit

Permalink
fix(sbb-toggle): calc pill position on hydration (#2259)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB committed Dec 5, 2023
1 parent 7f74573 commit 5260579
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/toggle/toggle/toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5260579

Please sign in to comment.