File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export default class IgcStepperComponent extends EventEmitterMixin<
6565 ) ;
6666
6767 private activeStep ! : IgcStepComponent ;
68+ private _shouldUpdateLinearState = false ;
6869
6970 /** Returns all of the stepper's steps. */
7071 @queryAssignedElements ( { selector : 'igc-step' } )
@@ -168,6 +169,10 @@ export default class IgcStepperComponent extends EventEmitterMixin<
168169
169170 @watch ( 'linear' , { waitUntilFirstUpdate : true } )
170171 protected linearChange ( ) : void {
172+ if ( ! this . activeStep ) {
173+ this . _shouldUpdateLinearState = true ;
174+ return ;
175+ }
171176 this . steps . forEach ( ( step : IgcStepComponent ) => {
172177 step . linearDisabled = this . linear ;
173178 if ( step . index <= this . activeStep . index ) {
@@ -482,6 +487,10 @@ export default class IgcStepperComponent extends EventEmitterMixin<
482487 }
483488
484489 this . syncProperties ( ) ;
490+ if ( this . _shouldUpdateLinearState ) {
491+ this . linearChange ( ) ;
492+ this . _shouldUpdateLinearState = false ;
493+ }
485494 if ( this . linear ) {
486495 this . updateStepsLinearDisabled ( ) ;
487496 }
You can’t perform that action at this time.
0 commit comments