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

    Interface InputOption

    One button in an options / input dialog. A bare string is shorthand for { label: string } whose identity is that same string (back-compat).

    Identity and display are deliberately separate: label is what the user SEES — and may be a thunk so a language change while the dialog is open re-localizes it — while id is the language-free value the caller COMPARES (results.option === 'insert') and never varies. Whether a button is the default (Enter) or the cancel (Esc) is NOT part of the option: that is contextual to the dialog and set by ShowOptionsOptions.defaultOption / ShowOptionsOptions.cancelOption.

    interface InputOption {
        disabled?: boolean | (() => boolean);
        id?: string;
        label: string | (() => string);
        renderButton?: (
            props: HTMLAttributes<HTMLButtonElement> & Attributes,
            isDefaultOption: boolean,
        ) => ReactNode;
    }
    Index
    disabled?: boolean | (() => boolean)

    Refuses the option outright: the button renders disabled, and Enter does not activate it as the default. A thunk resolves at render, so a dialog can gate its action on live editor state.

    This is for an action that is not OFFERED — a form the user has not made valid yet. It is not ShowOptionsOptions.onValidateOption, which lets the click through and then refuses to close; use that when the reason only emerges from the attempt (a rejected password).

    id?: string

    Stable, language-free identity returned as InputResults.option and compared by callers. Omit for a display-only button — then the option's own identity is returned (the string form, or this object by reference). NOT a thunk: an identity must not vary by language.

    label: string | (() => string)

    Button label. A thunk resolves at render, so a mid-dialog language change re-localizes it.

    renderButton?: (
        props: HTMLAttributes<HTMLButtonElement> & Attributes,
        isDefaultOption: boolean,
    ) => ReactNode

    Per-option custom button render (replaces the former dialog-level createOptionsButton).