Skip to content

Commit

Permalink
fix form reset for input/output parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
lharzenetter committed Oct 8, 2020
1 parent 10266ea commit df788f8
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ export class WineryIoParameterComponent {
this.modalTitle = 'Input Parameter';
this.validatorObject = new WineryValidatorObject(this.inputParameters, 'name');
this.addIntParametersModalRef = this.modalService.show(this.addIntParametersModal);
this.parameterForm.reset();

if (this.parameterForm) {
this.parameterForm.reset();
}
}

onAddInputParam(name: string, type: string, required: boolean) {
Expand Down Expand Up @@ -134,7 +137,10 @@ export class WineryIoParameterComponent {
this.modalTitle = 'Output Parameter';
this.validatorObject = new WineryValidatorObject(this.outputParameters, 'name');
this.addIntParametersModalRef = this.modalService.show(this.addIntParametersModal);
this.parameterForm.reset();

if (this.parameterForm) {
this.parameterForm.reset();
}
}

onAddOutputParam(name: string, type: string, required: boolean) {
Expand Down

0 comments on commit df788f8

Please sign in to comment.