Skip to content

Commit

Permalink
fix(step-finish): fix validation property [validateForm] not working …
Browse files Browse the repository at this point in the history
…on step finish.
  • Loading branch information
WilliamAguera committed Oct 1, 2019
1 parent 0781c13 commit ef6ac2f
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export class StepFinishDirective implements AfterViewInit, OnInit {

@HostListener('click')
onClick() {
if ( !this.stepService.isValidateForm() ) {
this.stepService.finish();
return;
}
if (this.stepService.isFormValid()) {
this.stepService.finish();
}
Expand All @@ -36,8 +40,10 @@ export class StepFinishDirective implements AfterViewInit, OnInit {
}

private setDisabled() {
this.button.disabled = !this.stepService.isFormValid();
this.change.detectChanges();
if ( this.stepService.isValidateForm()) {
this.button.disabled = !this.stepService.isFormValid();
this.change.detectChanges();
}
}

private changes() {
Expand Down

0 comments on commit ef6ac2f

Please sign in to comment.