diff --git a/projects/lib/src/form/form-wizard/form-wizard.component.ts b/projects/lib/src/form/form-wizard/form-wizard.component.ts index e4d0a94..7145c08 100644 --- a/projects/lib/src/form/form-wizard/form-wizard.component.ts +++ b/projects/lib/src/form/form-wizard/form-wizard.component.ts @@ -51,7 +51,7 @@ export class FormWizardComponent implements OnInit, OnChanges, AfterContentInit, @Output() beforeNavigateForward = new EventEmitter() @Output() navigateForward = new EventEmitter() @Output() navigateBackward = new EventEmitter() - @Output() navigationFailed = new EventEmitter() + @Output() navigationFailed = new EventEmitter() @Output() submitForm = new EventEmitter() @Output() clickOnStep: EventEmitter = new EventEmitter() @@ -145,12 +145,12 @@ export class FormWizardComponent implements OnInit, OnChanges, AfterContentInit, private beforeValidateCheckValidationResultAndPerformAction(activeForm: FormGroup | undefined, formWrapper: BalFormWrapper) { if (this.beforeNavigateForwardValidation) { - this.beforeNavigateForwardValidation.subscribe( + this.subscriptions.push(this.beforeNavigateForwardValidation.subscribe( (validationResult) => validationResult.isValid ? this.checkValidationResultAndPerformAction(activeForm, formWrapper) : this.navigationFailed.emit(validationResult.errorLabel), - () => this.navigationFailed.emit(), - ) + (e) => this.navigationFailed.emit(e), + )) } else { this.checkValidationResultAndPerformAction(activeForm, formWrapper) }