Skip to content

Commit 5dcab34

Browse files
committed
fix: markAllDirty(FormGroup) not marking children
FormControl doesn't have a markAllAsDirty method Closes #135
1 parent 45cfe2b commit 5dcab34

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libs/reactive-forms/src/lib/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,5 +134,5 @@ export function controlErrorChanges$(
134134
export function markAllDirty(control: AbstractControl): void {
135135
control.markAsDirty({ onlySelf: true });
136136

137-
(control as any)._forEachChild((control: any) => control.markAllAsDirty?.());
137+
(control as any)._forEachChild((control: any) => control.markAllAsDirty?.() || control.markAsDirty({ onlySelf: true }));
138138
}

0 commit comments

Comments
 (0)