The plugin added to fields by the uncontrolledPlugin.

interface UncontrolledPlugin {
    element: null | Element;
    elementsValueAccessor: ElementsValueAccessor;
    targetElements: readonly Element[];
    ref(element): void;
    refFor(key): ((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

    • element: null | Element

    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) => void)

      • (element): void
      • Parameters

        • element: null | Element

        Returns void