Skip to content

Commit

Permalink
fix: reset initial group values on reset
Browse files Browse the repository at this point in the history
  • Loading branch information
timdeschryver committed Feb 6, 2024
1 parent 013929c commit b3b6860
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/platform/src/lib/form-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@ export function createFormGroup<FormFields extends FormGroupCreator>(
(formFieldsMapOrSignal as WritableSignal<any[]>).set([
...initialArrayControls,
]);

for (const ctrl of initialArrayControls) {
ctrl.reset();
}
return;
}
return Object.values(fg).forEach((f) => {
Expand Down

0 comments on commit b3b6860

Please sign in to comment.