SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface InputFieldProps

    interface InputFieldProps {
        apiRef?: Ref<InputFieldApi>;
        changeOn?: "done" | "live";
        defaultInput?: string;
        formName?: string;
        formOptions?: RegisterOptions;
        helperText?: ReactNode;
        hideAdornment?: boolean;
        label?: string;
        onChangeError?: (error: string | null) => void;
        onChangeInput?: (value: string) => void;
        onChangeText?: (text: string) => void;
        onDone?: (value: string, args: EditDoneArgs) => void;
        onValidate?: (text: string) => void;
        propsInput?: InputHTMLAttributes<HTMLInputElement>;
        ref?: Ref<HTMLDivElement>;
        showError?: boolean;
        value?: string;
    }

    Hierarchy

    • FormControlProps
      • InputFieldProps
    Index
    apiRef?: Ref<InputFieldApi>

    The headless field API, for host-driven commit points the blur heuristic can't see — a dialog's OK handler calls apiRef.current?.commit() (Cancel: .cancel()).

    changeOn?: "done" | "live"

    'done' suppresses the live onChangeInput notifications entirely (validation still runs — error state stays live — but the host hears only onDone) and makes Enter the field's own commit point rather than a key the host form gets to see. Default 'live'.

    defaultInput?: string

    A default value — shown as the placeholder.

    formName?: string

    If provided will register with react-hook-form.

    We don't support changing the formName once rendered.

    formOptions?: RegisterOptions

    React-hook-form options.

    This is only used if formName is provided.

    helperText?: ReactNode

    Guidance shown under the field while it is VALID. The error takes that line when there is one — the field reserves it either way, so the layout never shifts.

    null (explicitly — not undefined, which takes the reserved default) COLLAPSES the line: the field's block ends at the input, so it centers against the buttons beside it in a toolbar-like row. An error then claims a line as it appears — for a field with no onValidate, or one whose host accepts the shift. The same contract as FormulaField's helperText.

    hideAdornment?: boolean

    Hide the adornment cluster (the ✓/✗ pair shown while engaged in modal mode).

    label?: string

    Field label. Default "Name".

    onChangeError?: (error: string | null) => void

    The validation error CHANGED — the message key, or null when the text became valid again. Translate at display (t(key) passes a non-key through unchanged).

    onChangeInput?: (value: string) => void

    Live notification of the value change — fires on every VALID text state.

    A PREVIEW channel: hosts that mutate the model per change (renaming a table) should act on onDone instead and treat this as optional live feedback.

    onChangeText?: (text: string) => void

    The raw TEXT channel: every display-text change the user causes — INVALID states included, and regardless of changeOn. For hosts that persist authored text and validate it later; onChangeInput would leave them holding the last VALID text while the field shows something else. An outside value change does not fire it.

    onDone?: (value: string, args: EditDoneArgs) => void

    The COMMIT channel: fires once with the final text when the edit finishes — a done key (Enter/Tab/Escape), the adornment ✓/✗, apiRef.current.commit(), or blur to another field. args.reason distinguishes accept from cancel (a cancel delivers the reverted session baseline). Not fired on an accept while the text is invalid — the error stays shown instead.

    Wiring this is also what shows the modal ✓/✗ adornment pair.

    onValidate?: (text: string) => void

    Validate the text — THROW to reject it. The message (an SDK validation error carries a message key) is shown as the field's error and blocks every accept path until it clears.

    propsInput?: InputHTMLAttributes<HTMLInputElement>

    Attributes for the INNER <input> — type, min/max/step, inputMode, a class of the host's own. Merged over the field's defaults (spell-check and autocomplete off).

    ref?: Ref<HTMLDivElement>

    Underlying reference to the input element.

    showError?: boolean

    Show the validation error on the field's helper line. Default true.

    false keeps the error outline but leaves the message to the host — for a host that collects it through onChangeError and shows it somewhere of its own. The same contract as FormulaField's showError.

    value?: string

    The committed value. The display text re-derives whenever it changes.