Hierarchy

  • FormDirective
    • FilterHeaderRowDirective

Implements

  • OnInit
  • OnDestroy

Constructors

Properties

_formDefinition: FormDefinition<any>
cdr: ChangeDetectorRef
context: InputSignal<Record<string, unknown>> = ...
directives: FormControlName[]

Tracks the list of added FormControlName instances

form: RxapFormGroup<any>

Tracks the FormGroup bound to this directive.

formDefinitionBuilder: null | RxapFormBuilder<any, FormType<any>> = null
initial?: any
invalidSubmit: EventEmitter<Record<string, any>> = ...
loaded$: ToggleSubject = ...
loadFailedMethod: null | FormLoadFailedMethod = null
loading$: ToggleSubject = ...
loadingError$: BehaviorSubject<null | Error> = ...
loadingIndicatorService: null | LoadingIndicatorService = null
loadMethod: null | FormLoadMethod<any> = null
loadSuccessfulMethod: null | FormLoadSuccessfulMethod<any> = null
name: null | string | number

The name for the control

ngSubmit: EventEmitter<any>

Emits an event when the form submission has been triggered.

rxapSubmit: EventEmitter<any> = ...

Emits when the submit method is executed without errors. The result of the submit method is passed as event object.

If no submit method is defined then emit after the submit button is clicked.

submitError$: BehaviorSubject<null | Error> = ...
submitFailedMethod: null | FormSubmitFailedMethod = null
submitMethod: null | FormSubmitMethod<any> = null
submitSuccessful$: EventEmitter<any> = ...
submitSuccessfulMethod: null | FormSubmitSuccessfulMethod<any> = null
submitting$: ToggleSubject = ...
"ɵdir": unknown
"ɵfac": unknown

Accessors

  • get asyncValidator(): null | AsyncValidatorFn

    Returns null | AsyncValidatorFn

    Asynchronous validator function composed of all the asynchronous validators registered with this directive.

  • get control(): FormGroup

    Returns FormGroup

    Returns the FormGroup bound to this directive.

  • get dirty(): null | boolean

    Returns null | boolean

    Reports whether the control is dirty, meaning that the user has changed the value in the UI. If the control is not present, null is returned.

  • get disabled(): null | boolean

    Returns null | boolean

    Reports whether the control is disabled, meaning that the control is disabled in the UI and is exempt from validation checks and excluded from aggregate values of ancestor controls. If the control is not present, null is returned.

  • get enabled(): null | boolean

    Returns null | boolean

    Reports whether the control is enabled, meaning that the control is included in ancestor calculations of validity or value. If the control is not present, null is returned.

  • get errors(): null | ValidationErrors

    Returns null | ValidationErrors

    Reports the control's validation errors. If the control is not present, null is returned.

  • get formDirective(): Form

    Returns Form

    Returns this directive's instance.

  • get invalid(): null | boolean

    Returns null | boolean

    Reports whether the control is invalid, meaning that an error exists in the input value. If the control is not present, null is returned.

  • get path(): string[]

    Returns string[]

    Returns an array representing the path to this group. Because this directive always lives at the top level of a form, it always an empty array.

  • get pending(): null | boolean

    Returns null | boolean

    Reports whether a control is pending, meaning that async validation is occurring and errors are not yet available for the input value. If the control is not present, null is returned.

  • get pristine(): null | boolean

    Returns null | boolean

    Reports whether the control is pristine, meaning that the user has not yet changed the value in the UI. If the control is not present, null is returned.

  • get status(): null | string

    Returns null | string

    Reports the validation status of the control. Possible values include: 'VALID', 'INVALID', 'DISABLED', and 'PENDING'. If the control is not present, null is returned.

  • get statusChanges(): null | Observable<any>

    Returns null | Observable<any>

    Returns a multicasting observable that emits a validation status whenever it is calculated for the control. If the control is not present, null is returned.

  • get submitted(): boolean

    Returns boolean

    Reports whether the form submission has been triggered.

  • set submitted(value: boolean): void

    Parameters

    • value: boolean

    Returns void

  • get touched(): null | boolean

    Returns null | boolean

    Reports whether the control is touched, meaning that the user has triggered a blur event on it. If the control is not present, null is returned.

  • get untouched(): null | boolean

    Returns null | boolean

    Reports whether the control is untouched, meaning that the user has not yet triggered a blur event on it. If the control is not present, null is returned.

  • get valid(): null | boolean

    Returns null | boolean

    Reports whether the control is valid. A control is considered valid if no validation errors exist with the current value. If the control is not present, null is returned.

  • get validator(): null | ValidatorFn

    Returns null | ValidatorFn

    Synchronous validator function composed of all the synchronous validators registered with this directive.

  • get value(): any

    Returns any

    Reports the value of the control if it is present, otherwise null.

  • get valueChanges(): null | Observable<any>

    Returns null | Observable<any>

    Returns a multicasting observable of value changes for the control that emits every time the value of the control changes in the UI or programmatically. If the control is not present, null is returned.

Methods

  • Parameters

    • dir: FormControlName

      The FormControlName directive instance.

    Returns FormControl

    Method that sets up the control directive in this group, re-calculates its value and validity, and adds the instance to the internal list of directives.

  • Performs the necessary setup when a FormArrayName directive instance is added to the view.

    Parameters

    • dir: FormArrayName

      The FormArrayName directive instance.

    Returns void

  • Adds a new FormGroupName directive instance to the form.

    Parameters

    • dir: FormGroupName

      The FormGroupName directive instance.

    Returns void

  • Parameters

    • dir: FormControlName

      The FormControlName directive instance.

    Returns FormControl

    Retrieves the FormControl instance from the provided FormControlName directive

  • Parameters

    • errorCode: string

      The code of the error to check

    • Optionalpath: string | (string | number)[]

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

    Returns any

    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'
  • Parameters

    • dir: FormArrayName

      The FormArrayName directive instance.

    Returns FormArray

    Retrieves the FormArray for a provided FormArrayName directive instance.

  • Parameters

    • dir: FormGroupName

      The FormGroupName directive instance.

    Returns FormGroup

    Retrieves the FormGroup for a provided FormGroupName directive instance

  • Parameters

    • errorCode: string

      The code of the error to check

    • Optionalpath: string | (string | number)[]

      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.

  • Returns void

    Method called when the "reset" event is triggered on the form.

  • Parameters

    • $event: Event

      The "submit" event object

    Returns boolean

    Method called with the "submit" event is triggered on the form. Triggers the ngSubmit emitter to emit the "submit" event as its payload.

  • Parameters

    • dir: FormControlName

      The FormControlName directive instance.

    Returns void

    Removes the FormControlName instance from the internal list of directives

  • Performs the necessary cleanup when a FormArrayName directive instance is removed from the view.

    Parameters

    • dir: FormArrayName

      The FormArrayName directive instance.

    Returns void

  • Performs the necessary cleanup when a FormGroupName directive instance is removed from the view.

    Parameters

    • dir: FormGroupName

      The FormGroupName directive instance.

    Returns void

  • Parameters

    • Optionalvalue: any

    Returns void

    Resets the control with the provided value if the control is present.

  • Parameters

    • Optionalvalue: any

      The new value for the form.

    Returns void

    Resets the form to an initial value and resets its submitted status.

  • Sets the new value for the provided FormControlName directive.

    Parameters

    • dir: FormControlName

      The FormControlName directive instance.

    • value: any

      The new value for the directive's control.

    Returns void