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

    Interface ShowOptionsOptions<T, C>

    Configuration for an options dialog.

    interface ShowOptionsOptions<T = any, C = any> {
        autoFocus?: string | boolean | FocusWindowOptions;
        cancelOption?: OptionInput;
        context?: () => C;
        defaultOption?: OptionInput;
        description?: string;
        disableAutoDestroy?: boolean;
        icon?: ReactNode;
        initialValue?: T;
        isModal?: boolean;
        onKeyDown?: (e: KeyboardEvent) => void;
        onOption?: (
            option: OptionInput,
            isCancel: boolean,
            isDefault: boolean,
        ) => void;
        onValidateOption?: (option?: OptionInput) => boolean | Promise<boolean>;
        options?: OptionInput[];
        prewarm?: boolean;
        title?: string;
        type?: NotifierType;
    }

    Type Parameters

    • T = any
    • C = any

    Hierarchy (View Summary)

    Index
    autoFocus?: string | boolean | FocusWindowOptions

    Query selector for the element to focus on show.

    cancelOption?: OptionInput

    The cancel option (Esc key), matched against the options by identity. Gets special styling.

    'Cancel'
    
    context?: () => C
    defaultOption?: OptionInput

    The option that is the default (Enter key), matched against the options by identity (a string matches an option's id/string form, an InputOption matches by reference).

    The first option
    
    description?: string

    Display text information for the user to make a decision.

    disableAutoDestroy?: boolean

    If true the window will not be automatically destroyed when closed.

    icon?: ReactNode

    An icon beside the description, in place of the one type implies. A string is an icon key.

    initialValue?: T

    A value the window can use to display.

    isModal?: boolean

    If true show a backdrop.

    Our movable menu achieves modality without a background by listens to global clicks (and focus)

    false
    
    onKeyDown?: (e: KeyboardEvent) => void

    Allow for tracking of key down events.

    Type Declaration

      • (e: KeyboardEvent): void
      • Parameters

        • e: KeyboardEvent

        Returns void

    onOption?: (option: OptionInput, isCancel: boolean, isDefault: boolean) => void

    Call when an option is selected. option is the selected option's IDENTITY (its id if provided, else the string form, else the InputOption object).

    It is possible that the option can be both a cancel and a default option.

    onValidateOption?: (option?: OptionInput) => boolean | Promise<boolean>

    Call when an option is selected. If false is returned, the dialog will not close. INotifier is not provided but can be supplied via the textFieldProps helperText property. option is the selected option's identity (see onOption).

    options?: OptionInput[]

    The dialog buttons: plain identity strings or rich InputOptions (mixable).

    prewarm?: boolean

    Mount the window hidden (do not reveal it) so a later real open is an instant reuse. Implies disableAutoDestroy (a prewarmed window must be kept alive). Use at idle to move the heavy first-mount cost off the user's open. A no-op if an instance already exists.

    false
    
    title?: string

    The title of the options panel

    What kind of message this is. info, warning, error and success show the matching icon beside the description; default (or omitted) shows none.