Skip to content

Commit

Permalink
feat(CB2-14451): populate fields correctly in amend
Browse files Browse the repository at this point in the history
  • Loading branch information
pbardy2000 committed Nov 28, 2024
1 parent 6118764 commit 803c6e4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class VehicleSectionEditComponent implements OnInit, OnDestroy {
const parent = this.controlContainer.control;
if (parent instanceof FormGroup) {
for (const key of Object.keys(this.form.controls)) {
parent.removeControl(key);
parent.removeControl(key, { emitEvent: false });
}
}

Expand Down Expand Up @@ -400,7 +400,7 @@ export class VehicleSectionEditComponent implements OnInit, OnDestroy {
addControlsBasedOffVehicleType() {
const vehicleControls = this.controlsBasedOffVehicleType;
for (const [key, control] of Object.entries(vehicleControls)) {
this.form.addControl(key, control);
this.form.addControl(key, control, { emitEvent: false });
}
}

Expand Down

0 comments on commit 803c6e4

Please sign in to comment.