diff options
Diffstat (limited to 'client/src/app/+signup/+register/custom-stepper.component.ts')
-rw-r--r-- | client/src/app/+signup/+register/custom-stepper.component.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/+signup/+register/custom-stepper.component.ts b/client/src/app/+signup/+register/custom-stepper.component.ts index 5a80895f9..3b7ba40e8 100644 --- a/client/src/app/+signup/+register/custom-stepper.component.ts +++ b/client/src/app/+signup/+register/custom-stepper.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component } from '@angular/core' | ||
2 | import { CdkStep, CdkStepper } from '@angular/cdk/stepper' | 1 | import { CdkStep, CdkStepper } from '@angular/cdk/stepper' |
2 | import { Component } from '@angular/core' | ||
3 | 3 | ||
4 | @Component({ | 4 | @Component({ |
5 | selector: 'my-custom-stepper', | 5 | selector: 'my-custom-stepper', |
@@ -14,13 +14,13 @@ export class CustomStepperComponent extends CdkStepper { | |||
14 | } | 14 | } |
15 | 15 | ||
16 | isCompleted (step: CdkStep) { | 16 | isCompleted (step: CdkStep) { |
17 | return step.stepControl && step.stepControl.dirty && step.stepControl.valid | 17 | return step.stepControl?.dirty && step.stepControl.valid |
18 | } | 18 | } |
19 | 19 | ||
20 | isAccessible (index: number) { | 20 | isAccessible (index: number) { |
21 | const stepsCompletedMap = this.steps.map(step => this.isCompleted(step)) | 21 | const stepsCompletedMap = this.steps.map(step => this.isCompleted(step)) |
22 | return index === 0 | 22 | return index === 0 |
23 | ? true | 23 | ? true |
24 | : stepsCompletedMap[ index - 1 ] | 24 | : stepsCompletedMap[index - 1] |
25 | } | 25 | } |
26 | } | 26 | } |