feat(forms): add markAllAsTouched()
to AbstractControl
(#26812)
Add functionality to mark a control and its descendant controls as touched Closes #19400 PR Close #26812
This commit is contained in:
@ -364,6 +364,16 @@ export abstract class AbstractControl {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the control and all its descendant controls as `touched`.
|
||||
* @see `markAsTouched()`
|
||||
*/
|
||||
markAllAsTouched(): void {
|
||||
this.markAsTouched({onlySelf: true});
|
||||
|
||||
this._forEachChild((control: AbstractControl) => control.markAllAsTouched());
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the control as `untouched`.
|
||||
*
|
||||
|
Reference in New Issue
Block a user