Class RxapFormGroup<T, E>

Type Parameters

Hierarchy

  • UntypedFormGroup
    • RxapFormGroup

Constructors

Properties

controlId: string
dirty$: Observable<boolean> = ...
disabled$: Observable<boolean> = ...
enabled$: Observable<boolean> = ...
errors: null | E

An object containing any errors generated by failing validation, or null if there are no errors.

errors$: Observable<null | E> = ...
events: Observable<ControlEvent<any>>

A multicasting observable that emits an event every time the state of the control changes. It emits for value, status, pristine or touched changes.

Note: On value change, the emit happens right after a value of this control is updated. The value of a parent control (for example if this FormControl is a part of a FormGroup) is updated later, so accessing a value of a parent control (using the value property) from the callback of this event might result in getting a value that has not been updated yet. Subscribe to the events of the parent control instead. For other event types, the events are emitted after the parent control has been updated.

status: ControlState

The validation status of the control.

FormControlStatus

These status values are mutually exclusive, so a control cannot be both valid AND invalid or invalid AND disabled.

status$: Observable<ControlState> = ...
statusChanges: Observable<ControlState>

A multicasting observable that emits an event every time the validation status of the control recalculates.

touch$: Observable<boolean> = ...
value: T

The current value of the control.

  • For a FormControl, the current value.
  • For an enabled FormGroup, the values of enabled controls as an object with a key-value pair for each member of the group.
  • For a disabled FormGroup, the values of all controls as an object with a key-value pair for each member of the group.
  • For a FormArray, the values of enabled controls as an array.
value$: Observable<T> = ...
valueChanges: Observable<T>

A multicasting observable that emits an event every time the value of the control changes, in the UI or programmatically. It also emits an event each time you call enable() or disable() without passing along {emitEvent: false} as a function argument.

Note: the emit happens right after a value of this control is updated. The value of a parent control (for example if this FormControl is a part of a FormGroup) is updated later, so accessing a value of a parent control (using the value property) from the callback of this event might result in getting a value that has not been updated yet. Subscribe to the valueChanges event of the parent control instead.

Accessors

  • get asyncValidator(): null | AsyncValidatorFn

    Returns the function that is used to determine the validity of this control asynchronously. If multiple validators have been added, this will be a single composed function. See Validators.compose() for additional information.

    Returns null | AsyncValidatorFn

  • set asyncValidator(asyncValidatorFn: null | AsyncValidatorFn): void

    Parameters

    • asyncValidatorFn: null | AsyncValidatorFn

    Returns void

  • get dirty(): boolean

    A control is dirty if the user has changed the value in the UI.

    Returns boolean

    True if the user has changed the value of this control in the UI; compare pristine. Programmatic changes to a control's value do not mark it dirty.

  • get disabled(): boolean

    A control is disabled when its status is DISABLED.

    Disabled controls are exempt from validation checks and are not included in the aggregate value of their ancestor controls.

    Returns boolean

    True if the control is disabled, false otherwise.

  • get enabled(): boolean

    A control is enabled as long as its status is not DISABLED.

    Returns boolean

    True if the control has any status other than 'DISABLED', false if the status is 'DISABLED'.

  • get invalid(): boolean

    A control is invalid when its status is INVALID.

    Returns boolean

    True if this control has failed one or more of its validation checks, false otherwise.

  • get parent(): null | FormGroup<any> | FormArray<any>

    The parent control.

    Returns null | FormGroup<any> | FormArray<any>

  • get pending(): boolean

    A control is pending when its status is PENDING.

    Returns boolean

    True if this control is in the process of conducting a validation check, false otherwise.

  • get pristine(): boolean

    A control is pristine if the user has not yet changed the value in the UI.

    Returns boolean

    True if the user has not yet changed the value in the UI; compare dirty. Programmatic changes to a control's value do not mark it dirty.

  • set pristine(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get root(): AbstractControl

    Retrieves the top-level ancestor of this control.

    Returns AbstractControl

  • get rxapFormDefinition(): | undefined
    | Partial<FormDefinition<T, any, any>> & {
        [K in string | number | symbol]: T[K] extends U[]
            ? | FormDefinitionArray<FormType<U>>
            | FormDefinitionArray<RxapFormControl<U, any, any>>
            | RxapFormArray<U, any, any>
            | RxapFormControl<any[any], any, any>
            : T[K] extends Record<string, any>
                ?
                    | Partial<FormDefinition<any[any], any, any>> & {
                        [K in string | number | symbol]: any[any][K] extends U[]
                            ? | FormDefinitionArray<(...)>
                            | FormDefinitionArray<(...)>
                            | RxapFormArray<(...), (...), (...)>
                            | RxapFormControl<(...), (...), (...)>
                            : (...)[(...)] extends Record<(...), (...)>
                                ? (...) | (...)
                                : RxapFormControl<(...), (...), (...)>
                    } & Partial<FormDefinition<any[any], any, any>>
                    | RxapFormControl<any[any], any, any>
                : RxapFormControl<NonEmpty<T[K]>, any, any>
    } & FormDefinition<T, any, any>
    Internal

    Returns
        | undefined
        | Partial<FormDefinition<T, any, any>> & {
            [K in string | number | symbol]: T[K] extends U[]
                ? | FormDefinitionArray<FormType<U>>
                | FormDefinitionArray<RxapFormControl<U, any, any>>
                | RxapFormArray<U, any, any>
                | RxapFormControl<any[any], any, any>
                : T[K] extends Record<string, any>
                    ?
                        | Partial<FormDefinition<any[any], any, any>> & {
                            [K in string | number | symbol]: any[any][K] extends U[]
                                ? | FormDefinitionArray<(...)>
                                | FormDefinitionArray<(...)>
                                | RxapFormArray<(...), (...), (...)>
                                | RxapFormControl<(...), (...), (...)>
                                : (...)[(...)] extends Record<(...), (...)>
                                    ? (...) | (...)
                                    : RxapFormControl<(...), (...), (...)>
                        } & Partial<FormDefinition<any[any], any, any>>
                        | RxapFormControl<any[any], any, any>
                    : RxapFormControl<NonEmpty<T[K]>, any, any>
        } & FormDefinition<T, any, any>

  • get touched(): boolean

    True if the control is marked as touched.

    A control is marked touched once the user has triggered a blur event on it.

    Returns boolean

  • set touched(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get untouched(): boolean

    True if the control has not been marked as touched

    A control is untouched if the user has not yet triggered a blur event on it.

    Returns boolean

  • get updateOn(): FormHooks

    Reports the update strategy of the AbstractControl (meaning the event on which the control updates itself). Possible values: 'change' | 'blur' | 'submit' Default value: 'change'

    Returns FormHooks

  • get valid(): boolean

    A control is valid when its status is VALID.

    Returns boolean

    True if the control has passed all of its validation tests, false otherwise.

  • get validator(): null | ValidatorFn

    Returns the function that is used to determine the validity of this control synchronously. If multiple validators have been added, this will be a single composed function. See Validators.compose() for additional information.

    Returns null | ValidatorFn

  • set validator(validatorFn: null | ValidatorFn): void

    Parameters

    • validatorFn: null | ValidatorFn

    Returns void

Methods

  • Add an asynchronous validator or validators to this control, without affecting other validators.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    Adding a validator that already exists will have no effect.

    Parameters

    • validators: AsyncValidatorFn | AsyncValidatorFn[]

      The new asynchronous validator function or functions to add to this control.

    Returns void

  • Add a control to this group. In a strongly-typed group, the control must be in the group's type (possibly as an optional key).

    If a control with a given name already exists, it would not be replaced with a new one. If you want to replace an existing control, use the FormGroup#setControl setControl method instead. This method also updates the value and validity of the control.

    Type Parameters

    • K extends string

    Parameters

    • name: K

      The control name to add to the collection

    • control: AbstractControl<T[K]>

      Provides the control for the given name

    Returns void

  • Add a synchronous validator or validators to this control, without affecting other validators.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    Adding a validator that already exists will have no effect. If duplicate validator functions are present in the validators array, only the first instance would be added to a form control.

    Parameters

    • validators: ValidatorFn | ValidatorFn[]

      The new validator function or functions to add to this control.

    Returns void

  • Empties out the async validator list.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    Returns void

  • Empties out the synchronous validator list.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    Returns void

  • Check whether there is an enabled control with the given name in the group.

    Reports false for disabled controls. If you'd like to check for existence in the group only, use get instead.

    Parameters

    • controlName: ExtractStrings<T>

      The control name to check for existence in the collection

    Returns boolean

    false for disabled controls, true otherwise.

  • Disables the control. This means the control is exempt from validation checks and excluded from the aggregate value of any parent. Its status is DISABLED.

    If the control has children, all children are also disabled.

    Parameters

    • Optionalopts: { emitEvent?: boolean; onlySelf?: boolean }

      Configuration options that determine how the control propagates changes and emits events after the control is disabled.

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the statusChanges, valueChanges and events observables emit events with the latest status and value when the control is disabled. When false, no events are emitted.

    Returns void

  • Enables the control. This means the control is included in validation checks and the aggregate value of its parent. Its status recalculates based on its value and its validators.

    By default, if the control has children, all children are enabled.

    Parameters

    • Optionalopts: { emitEvent?: boolean; onlySelf?: boolean }

      Configure options that control how the control propagates changes and emits events when marked as untouched

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the statusChanges, valueChanges and events observables emit events with the latest status and value when the control is enabled. When false, no events are emitted.

    Returns void

  • Type Parameters

    • K extends string | number | symbol
    • K1 extends string | number | symbol

    Parameters

    • errorCode: K

      The code of the error to check

    • Optionalpath: [K1]

      A list of control names that designates how to move from the current control to the control that should be queried for errors.

    Returns null | E[K]

    error data for that particular error. If the control or error is not present, null is returned.

    Reports error data for the control with the given path.

    For example, for the following FormGroup:

    form = new FormGroup({
    address: new FormGroup({ street: new FormControl() })
    });

    The path to the 'street' control from the root form would be 'address' -> 'street'.

    It can be provided to this method in one of two formats:

    1. An array of string control names, e.g. ['address', 'street']
    2. A period-delimited list of control names in one string, e.g. 'address.street'
  • Type Parameters

    • K extends string | number | symbol
    • K1 extends string | number | symbol
    • K2 extends string | number | symbol

    Parameters

    • errorCode: K
    • Optionalpath: [K1, K2]

    Returns null | E[K]

  • Type Parameters

    • K extends string | number | symbol
    • K1 extends string | number | symbol
    • K2 extends string | number | symbol
    • K3 extends string | number | symbol

    Parameters

    • errorCode: K
    • Optionalpath: [K1, K2, K3]

    Returns null | E[K]

  • Type Parameters

    • K extends string | number | symbol

    Parameters

    • errorCode: K
    • Optionalpath: string

    Returns null | E[K]

  • Check whether an asynchronous validator function is present on this control. The provided validator must be a reference to the exact same function that was provided.

    Parameters

    • validator: AsyncValidatorFn

      The asynchronous validator to check for presence. Compared by function reference.

    Returns boolean

    Whether the provided asynchronous validator was found on this control.

  • Type Parameters

    • K1 extends string | number | symbol

    Parameters

    • errorCode: ExtractStrings<E>

      The code of the error to check

    • Optionalpath: [K1]

      A list of control names that designates how to move from the current control to the control that should be queried for errors.

    Returns boolean

    whether the given error is present in the control at the given path.

    If the control is not present, false is returned.

    Reports whether the control with the given path has the error specified.

    For example, for the following FormGroup:

    form = new FormGroup({
    address: new FormGroup({ street: new FormControl() })
    });

    The path to the 'street' control from the root form would be 'address' -> 'street'.

    It can be provided to this method in one of two formats:

    1. An array of string control names, e.g. ['address', 'street']
    2. A period-delimited list of control names in one string, e.g. 'address.street'

    If no path is given, this method checks for the error on the current control.

  • Type Parameters

    • K1 extends string | number | symbol
    • K2 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • K1 extends string | number | symbol
    • K2 extends string | number | symbol
    • K3 extends string | number | symbol

    Parameters

    Returns boolean

  • Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol
    • P2 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol
    • P2 extends string | number | symbol
    • P3 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol
    • P2 extends string | number | symbol
    • P3 extends string | number | symbol
    • P4 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol
    • P2 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol
    • P2 extends string | number | symbol
    • P3 extends string | number | symbol

    Parameters

    Returns boolean

  • Type Parameters

    • P1 extends string | number | symbol
    • P2 extends string | number | symbol
    • P3 extends string | number | symbol
    • P4 extends string | number | symbol

    Parameters

    Returns boolean

  • Check whether a synchronous validator function is present on this control. The provided validator must be a reference to the exact same function that was provided.

    Parameters

    • validator: ValidatorFn

      The validator to check for presence. Compared by function reference.

    Returns boolean

    Whether the provided validator was found on this control.

    // Reference to the RequiredValidator
    const ctrl = new FormControl<number | null>(0, Validators.required);
    expect(ctrl.hasValidator(Validators.required)).toEqual(true)

    // Reference to anonymous function inside MinValidator
    const minValidator = Validators.min(3);
    const ctrl = new FormControl<number | null>(0, minValidator);
    expect(ctrl.hasValidator(minValidator)).toEqual(true)
    expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)
  • Marks the control and all its descendant controls as touched.

    Parameters

    • Optionalopts: { emitEvent?: boolean }

      Configuration options that determine how the control propagates changes and emits events after marking is applied.

      • emitEvent: When true or not supplied (the default), the events observable emits a TouchedChangeEvent with the touched property being true. When false, no events are emitted.

    Returns void

    ()

  • Marks the control as dirty. A control becomes dirty when the control's value is changed through the UI; compare markAsTouched.

    Parameters

    • Optionalopts: OnlySelf

      Configuration options that determine how the control propagates changes and emits events after marking is applied.

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the events observable emits a PristineChangeEvent with the pristine property being false. When false, no events are emitted.

    Returns void

  • Marks the control as pending.

    A control is pending while the control performs async validation.

    Parameters

    • Optionalopts: { emitEvent?: boolean; onlySelf?: boolean }

      Configuration options that determine how the control propagates changes and emits events after marking is applied.

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the statusChanges observable emits an event with the latest status the control is marked pending and the events observable emits a StatusChangeEvent with the status property being PENDING When false, no events are emitted.

    Returns void

  • Marks the control as pristine.

    If the control has any children, marks all children as pristine, and recalculates the pristine status of all parent controls.

    Parameters

    • Optionalopts: OnlySelf

      Configuration options that determine how the control emits events after marking is applied.

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the events observable emits a PristineChangeEvent with the pristine property being true. When false, no events are emitted.

    Returns void

  • Marks the control as touched. A control is touched by focus and blur events that do not change the value.

    Parameters

    • Optionalopts: OnlySelf

      Configuration options that determine how the control propagates changes and emits events after marking is applied.

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the events observable emits a TouchedChangeEvent with the touched property being true. When false, no events are emitted.

    Returns void

  • Marks the control as untouched.

    If the control has any children, also marks all children as untouched and recalculates the touched status of all parent controls.

    Parameters

    • Optionalopts: OnlySelf

      Configuration options that determine how the control propagates changes and emits events after the marking is applied.

      • onlySelf: When true, mark only this control. When false or not supplied, marks all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the events observable emits a TouchedChangeEvent with the touched property being false. When false, no events are emitted.

    Returns void

  • Patches the value of the FormGroup. It accepts an object with control names as keys, and does its best to match the values to the correct controls in the group.

    It accepts both super-sets and sub-sets of the group without throwing an error.

    Parameters

    • valueOrObservable: Observable<Partial<T>>
    • Optionaloptions: ControlEventOptions

      Configuration options that determine how the control propagates changes and emits events after the value is patched.

      • onlySelf: When true, each change only affects this control and not its parent. Default is true.
      • emitEvent: When true or not supplied (the default), both the statusChanges and valueChanges observables emit events with the latest status and value when the control value is updated. When false, no events are emitted. The configuration options are passed to the updateValueAndValidity method.

    Returns Subscription

    const form = new FormGroup({
    first: new FormControl(),
    last: new FormControl()
    });
    console.log(form.value); // {first: null, last: null}

    form.patchValue({first: 'Nancy'});
    console.log(form.value); // {first: 'Nancy', last: null}
  • Parameters

    Returns void

  • Registers a control with the group's list of controls. In a strongly-typed group, the control must be in the group's type (possibly as an optional key).

    This method does not update the value or validity of the control. Use FormGroup#addControl addControl instead.

    Type Parameters

    • K extends string

    Parameters

    • name: K

      The control name to register in the collection

    • control: any

      Provides the control for the given name

    Returns any

  • Registers a control with the group's list of controls. In a strongly-typed group, the control must be in the group's type (possibly as an optional key).

    This method does not update the value or validity of the control. Use FormGroup#addControl addControl instead.

    Parameters

    • this: FormGroup<{ [key: string]: AbstractControl<any, any> }>
    • name: string

      The control name to register in the collection

    • control: AbstractControl<any>

      Provides the control for the given name

    Returns AbstractControl<any>

  • Remove an asynchronous validator from this control, without affecting other validators. Validators are compared by function reference; you must pass a reference to the exact same validator function as the one that was originally set. If a provided validator is not found, it is ignored.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    Parameters

    • validators: AsyncValidatorFn | AsyncValidatorFn[]

      The asynchronous validator or validators to remove.

    Returns void

  • Remove a synchronous validator from this control, without affecting other validators. Validators are compared by function reference; you must pass a reference to the exact same validator function as the one that was originally set. If a provided validator is not found, it is ignored.

    Parameters

    • validators: ValidatorFn | ValidatorFn[]

      The validator or validators to remove.

    Returns void

    // Reference to the RequiredValidator
    const ctrl = new FormControl<string | null>('', Validators.required);
    ctrl.removeValidators(Validators.required);

    // Reference to anonymous function inside MinValidator
    const minValidator = Validators.min(3);
    const ctrl = new FormControl<string | null>('', minValidator);
    expect(ctrl.hasValidator(minValidator)).toEqual(true)
    expect(ctrl.hasValidator(Validators.min(3))).toEqual(false)

    ctrl.removeValidators(minValidator);

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

  • Resets the FormGroup, marks all descendants pristine and untouched and sets the value of all descendants to their default values, or null if no defaults were provided.

    You reset to a specific form state by passing in a map of states that matches the structure of your form, with control names as keys. The state is a standalone value or a form state object with both a value and a disabled status.

    Parameters

    • OptionalformState: Partial<T>
    • Optionaloptions: ControlEventOptions

      Configuration options that determine how the control propagates changes and emits events when the group is reset.

      • onlySelf: When true, each change only affects this control, and not its parent. Default is false.
      • emitEvent: When true or not supplied (the default), both the statusChanges and valueChanges observables emit events with the latest status and value when the control is reset. When false, no events are emitted. The configuration options are passed to the updateValueAndValidity method.

    Returns void

    const form = new FormGroup({
    first: new FormControl('first name'),
    last: new FormControl('last name')
    });

    console.log(form.value); // {first: 'first name', last: 'last name'}

    form.reset({ first: 'name', last: 'last name' });

    console.log(form.value); // {first: 'name', last: 'last name'}
    const form = new FormGroup({
    first: new FormControl('first name'),
    last: new FormControl('last name')
    });

    form.reset({
    first: {value: 'name', disabled: true},
    last: 'last'
    });

    console.log(form.value); // {last: 'last'}
    console.log(form.get('first').status); // 'DISABLED'
  • Sets the asynchronous validators that are active on this control. Calling this overwrites any existing asynchronous validators.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    If you want to add a new validator without affecting existing ones, consider using addAsyncValidators() method instead.

    Parameters

    Returns void

  • Replace an existing control. In a strongly-typed group, the control must be in the group's type (possibly as an optional key).

    If a control with a given name does not exist in this FormGroup, it will be added.

    Type Parameters

    • K extends string

    Parameters

    • name: K

      The control name to replace in the collection

    • control: AbstractControl<T[K]>

      Provides the control for the given name

    Returns void

  • Sets errors on a form control when running validations manually, rather than automatically.

    Calling setErrors also updates the validity of the parent control.

    Parameters

    • errors: null | Partial<E>
    • opts: EmitEvent = {}

      Configuration options that determine how the control propagates changes and emits events after the control errors are set.

      • emitEvent: When true or not supplied (the default), the statusChanges observable emits an event after the errors are set.

    Returns void

    const login = new FormControl('someLogin');
    login.setErrors({
    notUnique: true
    });

    expect(login.valid).toEqual(false);
    expect(login.errors).toEqual({ notUnique: true });

    login.setValue('someOtherLogin');

    expect(login.valid).toEqual(true);
  • Sets the parent of the control

    Parameters

    • parent: null | FormGroup<any> | FormArray<any>

      The new parent.

    Returns void

  • Sets the synchronous validators that are active on this control. Calling this overwrites any existing synchronous validators.

    When you add or remove a validator at run time, you must call updateValueAndValidity() for the new validation to take effect.

    If you want to add a new validator without affecting existing ones, consider using addValidators() method instead.

    Parameters

    • newValidator: Validator
    • updateValueAndValidity: boolean = true

    Returns void

  • Sets the value of the FormGroup. It accepts an object that matches the structure of the group, with control names as keys.

    Parameters

    • valueOrObservable: Observable<T>
    • Optionaloptions: ControlEventOptions

      Configuration options that determine how the control propagates changes and emits events after the value changes. The configuration options are passed to the updateValueAndValidity method.

      • onlySelf: When true, each change only affects this control, and not its parent. Default is false.
      • emitEvent: When true or not supplied (the default), both the statusChanges and valueChanges observables emit events with the latest status and value when the control value is updated. When false, no events are emitted.

    Returns Subscription

    const form = new FormGroup({
    first: new FormControl(),
    last: new FormControl()
    });

    console.log(form.value); // {first: null, last: null}

    form.setValue({first: 'Nancy', last: 'Drew'});
    console.log(form.value); // {first: 'Nancy', last: 'Drew'}

    When strict checks fail, such as setting the value of a control that doesn't exist or if you exclude a value of a control that does exist.

  • Parameters

    Returns void

  • Recalculates the value and validation status of the control.

    By default, it also updates the value and validity of its ancestors.

    Parameters

    • Optionalopts: { emitEvent?: boolean; onlySelf?: boolean }

      Configuration options determine how the control propagates changes and emits events after updates and validity checks are applied.

      • onlySelf: When true, only update this control. When false or not supplied, update all direct ancestors. Default is false.
      • emitEvent: When true or not supplied (the default), the statusChanges, valueChanges and events observables emit events with the latest status and value when the control is updated. When false, no events are emitted.

    Returns void