Skip to content

Commit

Permalink
refactor(sbb-stepper): move setter before getter (#2732)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeripeierSBB authored Jun 10, 2024
1 parent f0b7b5c commit c3ae839
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/elements/stepper/stepper/stepper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ export class SbbStepperElement extends LitElement {

/** Overrides the behaviour of `orientation` property. */
@property({ attribute: 'horizontal-from', reflect: true })
public get horizontalFrom(): SbbHorizontalFrom | undefined {
return this._horizontalFrom;
}
public set horizontalFrom(value: SbbHorizontalFrom) {
this._horizontalFrom = breakpoints.includes(value) ? value : undefined;
if (this._horizontalFrom && this._loaded) {
this._checkOrientation();
}
}
public get horizontalFrom(): SbbHorizontalFrom | undefined {
return this._horizontalFrom;
}
private _horizontalFrom?: SbbHorizontalFrom | undefined;

/** Steps orientation, either horizontal or vertical. */
Expand Down

0 comments on commit c3ae839

Please sign in to comment.