GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Tutorials
  • Playground
  • Reference
  • code
  • FieldTree
  • ReadonlyFieldTree
  • Signal
  • DisabledReason
  • WithFieldTree
  • FormFieldBinding

This view

  • Original page
  • New address

GeezerVison is showing next.angular.dev — ReadonlyFieldState • Angular

API

    
      interface ReadonlyFieldState<TValue, TKey extends string | number = string | number> {}
    
    

The FieldTree associated with this field state.

A writable signal containing the value for this field.

Updating this signal will update the data model that the field is bound to.

While updates from the UI control are eventually reflected here, they may be delayed if debounced.

A signal containing the value of the control to which this field is bound.

This differs from value in that it's not subject to debouncing, and thus is used to buffer debounced updates from the control to the field. This will also not take into account the controlValue of children.

A signal indicating whether the field is currently disabled.

A signal indicating the field's maximum value, if applicable.

Applies to <input> with a numeric or date type attribute and custom controls.

A signal indicating the field's maximum string length, if applicable.

Applies to <input>, <textarea>, and custom controls.

A signal indicating the field's minimum value, if applicable.

Applies to <input> with a numeric or date type attribute and custom controls.

A signal indicating the field's minimum string length, if applicable.

Applies to <input>, <textarea>, and custom controls.

A signal of a unique name for the field, by default based on the name of its parent field.

A signal indicating the patterns the field must match.

A signal indicating whether the field is currently readonly.

A signal indicating whether the field is required.

A signal indicating whether the field has been touched by the user.

A signal indicating whether field value has been changed by user.

A signal indicating whether a field is hidden.

When a field is hidden it is ignored when determining the valid, touched, and dirty states.

Note: This doesn't hide the field in the template, that must be done manually.

@if (!field.hidden()) {
  ...
}

A signal containing the errors of the field itself, excluding its descendants.

A signal containing the errors of the field and its descendants.

A signal indicating whether the field's value is currently valid.

Note: valid() is not the same as !invalid().

  • valid() is true when there are no validation errors and no pending validators.
  • invalid() is true when there are validation errors, regardless of pending validators.

Ex: consider the situation where a field has 3 validators, 2 of which have no errors and 1 of which is still pending. In this case valid() is false because of the pending validator. However invalid() is also false because there are no errors.

A signal indicating whether the field's value is currently invalid.

Note: invalid() is not the same as !valid().

  • invalid() is true when there are validation errors, regardless of pending validators.
  • valid() is true when there are no validation errors and no pending validators.

Ex: consider the situation where a field has 3 validators, 2 of which have no errors and 1 of which is still pending. In this case invalid() is false because there are no errors. However valid() is also false because of the pending validator.

Whether there are any validators still pending for this field.

A signal indicating whether the field is currently in the process of being submitted.

The property key in the parent field under which this field is stored. If the parent field is array-valued, for example, this is the index of this field in that array.

The FormField directives that bind this field to a UI control.

Reads a metadata value from the field.

@paramkeyMetadataKey<M, any, any>

The metadata key to read.

@returnsM | undefined

Checks whether a metadata value exists on the field.

@paramkeyMetadataKey<any, any, any>

The metadata key to check.

@returnsboolean

Focuses the first UI control in the DOM that is bound to this field state. If no UI control is bound, does nothing.

@paramoptionsFocusOptions | undefined

Optional focus options to pass to the native focus() method.

@returnsvoid
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.