The plugin added to fields by the uncontrolledPlugin.

interface UncontrolledPlugin {
    element: null | Element;
    elementsValueAccessor: ElementsValueAccessor;
    targetElements: readonly Element[];
    ref(element: null | Element): void;
    refFor(key: unknown): ((element: null | Element) => void);
}

Properties

element: null | Element

The DOM element associated with the field, or null if there's no associated element.

elementsValueAccessor: ElementsValueAccessor

The accessor that reads and writes the field value from and to targetElements.

targetElements: readonly Element[]

The array of elements that are used to derive the field value, includes element.

Methods

  • Associates the field with the DOM element.

    Parameters

    Returns void

  • Returns a callback that associates the field with the DOM element under the given key. The same callback is returned when this method is called with the same key.

    Parameters

    • key: unknown

      The key for which the reference callback must be returned. To associate multiple elements with the same field, use different keys.

    Returns ((element: null | Element) => void)

      • (element): void
      • Parameters

        Returns void