interface FormOptions {
    idPrefix: string;
    live?: boolean;
    values: Readonly<Record<string, unknown>>;
    custom(control: FormControl, row: HTMLElement): null | HTMLElement;
    onChange(key: string, value: unknown): void;
    unavailable(key: string, option?: string): null | string;
}

Properties

idPrefix: string

Prefix for element ids, so two forms in one document never share one.

live?: boolean

Emit colour and slider edits on input as well as change, for a dialog that previews live. Off, a colour is one edit when the picker closes and a slider one edit on release, which is what a per-edit undo history wants.

values: Readonly<Record<string, unknown>>

Methods

  • Renders the control column of a custom row. Null skips the row.

    Parameters

    Returns null | HTMLElement

  • Every edit, with the value in the control's declared type.

    Parameters

    • key: string
    • value: unknown

    Returns void

  • Why a control, or one option of a select, cannot act right now, or null when it can. Drawn disabled with the reason as its title, never hidden: a greyed row is information, an absent one is a mystery.

    Parameters

    • key: string
    • Optionaloption: string

    Returns null | string