Formwright
    Preparing search index...

    Interface ControlWiring<V>

    What a field passes every control, whichever it is.

    interface ControlWiring<V> {
        callout?: boolean;
        describedBy?: string;
        disabled?: boolean;
        id: string;
        invalid?: boolean;
        label?: string;
        name: string;
        onChange: (value: V) => void;
        placeholder?: string;
        readonly?: boolean;
        required?: boolean;
        type: string;
        value: V | null | undefined;
    }

    Type Parameters

    • V
    Index
    callout?: boolean

    The control renders inside a callout: a popover in the top layer. A control with its own floating UI (a dropdown, a date picker) should render it in place, inside the control, or it opens underneath the popover and a click on it closes the callout.

    describedBy?: string

    Space-separated ids of the hint and error elements.

    disabled?: boolean
    id: string

    Put this on the focusable element: the field's

    invalid?: boolean
    label?: string
    name: string

    Form-unique name, e.g. for radio groups.

    onChange: (value: V) => void

    What the control stores; the field only accepts a control whose V its path can hold.

    placeholder?: string
    readonly?: boolean
    required?: boolean
    type: string

    The control name the field was given (email, select, ...).

    value: V | null | undefined

    The value at the field's path; a model can hold null or nothing there.