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 @@ -68,6 +68,7 @@ export default class IgcStepperComponent extends EventEmitterMixin<
6868 ) ;
6969
7070 private activeStep ! : IgcStepComponent ;
71+ private _shouldUpdateLinearState = false ;
7172
7273 /** Returns all of the stepper's steps. */
7374 @queryAssignedElements ( { selector : 'igc-step' } )
@@ -171,6 +172,10 @@ export default class IgcStepperComponent extends EventEmitterMixin<
171172
172173 @watch ( 'linear' , { waitUntilFirstUpdate : true } )
173174 protected linearChange ( ) : void {
175+ if ( ! this . activeStep ) {
176+ this . _shouldUpdateLinearState = true ;
177+ return ;
178+ }
174179 this . steps . forEach ( ( step : IgcStepComponent ) => {
175180 step . linearDisabled = this . linear ;
176181 if ( step . index <= this . activeStep . index ) {
@@ -480,6 +485,10 @@ export default class IgcStepperComponent extends EventEmitterMixin<
480485 }
481486
482487 this . syncProperties ( ) ;
488+ if ( this . _shouldUpdateLinearState ) {
489+ this . linearChange ( ) ;
490+ this . _shouldUpdateLinearState = false ;
491+ }
483492 if ( this . linear ) {
484493 this . updateStepsLinearDisabled ( ) ;
485494 }
You can’t perform that action at this time.
0 commit comments