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

    Interface OptionsDialogProps<T, C>

    interface OptionsDialogProps<T = any, C = any> {
        autoFocus?: string | boolean | FocusWindowOptions;
        autoFocusSel?: string;
        cancelOption?: OptionInput;
        context?: () => C;
        defaultOption?: OptionInput;
        description?: string;
        disableAutoDestroy?: boolean;
        icon?: ReactNode;
        initialPosition?: RelativePoint;
        initialValue?: T;
        isModal?: boolean;
        onCancel?: () => void;
        onDone?: (results?: any) => void;
        onHide?: () => void;
        onKeyDown?: (e: KeyboardEvent) => void;
        onOption?: (
            option: OptionInput,
            isCancel: boolean,
            isDefault: boolean,
        ) => void;
        onShow?: () => void;
        onShown?: (internalWindow: IInternalWindowElement) => void;
        onValidateOption?: (option?: OptionInput) => boolean | Promise<boolean>;
        open?: boolean;
        options?: OptionInput[];
        prewarm?: boolean;
        restoreFocus?: boolean | (() => boolean);
        revealToken?: number;
        slotProps?: {
            backdrop?: BackdropOwnProps & CommonProps & Omit<
                DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>,

                    | "color"
                    | "content"
                    | "transitionDuration"
                    | "translate"
                    | "className"
                    | "style"
                    | "classes"
                    | "children"
                    | "sx"
                    | "slot"
                    | "title"
                    | "ref"
                    | "defaultChecked"
                    | "defaultValue"
                    | "suppressContentEditableWarning"
                    | "suppressHydrationWarning"
                    | "accessKey"
                    | "autoCapitalize"
                    | "autoFocus"
                    | "contentEditable"
                    | "contextMenu"
                    | "dir"
                    | "draggable"
                    | "enterKeyHint"
                    | "hidden"
                    | "id"
                    | "lang"
                    | "nonce"
                    | "spellCheck"
                    | "tabIndex"
                    | "radioGroup"
                    | "role"
                    | "about"
                    | "datatype"
                    | "inlist"
                    | "prefix"
                    | "property"
                    | "rel"
                    | "resource"
                    | "rev"
                    | "typeof"
                    | "vocab"
                    | "autoCorrect"
                    | "autoSave"
                    | "itemProp"
                    | "itemScope"
                    | "itemType"
                    | "itemID"
                    | "itemRef"
                    | "results"
                    | "security"
                    | "unselectable"
                    | "popover"
                    | "popoverTargetAction"
                    | "popoverTarget"
                    | "inert"
                    | "inputMode"
                    | "is"
                    | "exportparts"
                    | "part"
                    | "aria-activedescendant"
                    | "aria-atomic"
                    | "aria-autocomplete"
                    | "aria-braillelabel"
                    | "aria-brailleroledescription"
                    | "aria-busy"
                    | "aria-checked"
                    | "aria-colcount"
                    | "aria-colindex"
                    | "aria-colindextext"
                    | "aria-colspan"
                    | "aria-controls"
                    | "aria-current"
                    | "aria-describedby"
                    | "aria-description"
                    | "aria-details"
                    | "aria-disabled"
                    | "aria-dropeffect"
                    | "aria-errormessage"
                    | "aria-expanded"
                    | "aria-flowto"
                    | "aria-grabbed"
                    | "aria-haspopup"
                    | "aria-hidden"
                    | "aria-invalid"
                    | "aria-keyshortcuts"
                    | "aria-label"
                    | "aria-labelledby"
                    | "aria-level"
                    | "aria-live"
                    | "aria-modal"
                    | "aria-multiline"
                    | "aria-multiselectable"
                    | "aria-orientation"
                    | "aria-owns"
                    | "aria-placeholder"
                    | "aria-posinset"
                    | "aria-pressed"
                    | "aria-readonly"
                    | "aria-relevant"
                    | "aria-required"
                    | "aria-roledescription"
                    | "aria-rowcount"
                    | "aria-rowindex"
                    | "aria-rowindextext"
                    | "aria-rowspan"
                    | "aria-selected"
                    | "aria-setsize"
                    | "aria-sort"
                    | "aria-valuemax"
                    | "aria-valuemin"
                    | "aria-valuenow"
                    | "aria-valuetext"
                    | "dangerouslySetInnerHTML"
                    | "onCopy"
                    | "onCopyCapture"
                    | "onCut"
                    | "onCutCapture"
                    | "onPaste"
                    | "onPasteCapture"
                    | "onCompositionEnd"
                    | "onCompositionEndCapture"
                    | "onCompositionStart"
                    | "onCompositionStartCapture"
                    | "onCompositionUpdate"
                    | "onCompositionUpdateCapture"
                    | "onFocus"
                    | "onFocusCapture"
                    | "onBlur"
                    | "onBlurCapture"
                    | "onChange"
                    | "onChangeCapture"
                    | "onBeforeInput"
                    | "onBeforeInputCapture"
                    | "onInput"
                    | "onInputCapture"
                    | "onReset"
                    | "onResetCapture"
                    | "onSubmit"
                    | "onSubmitCapture"
                    | "onInvalid"
                    | "onInvalidCapture"
                    | "onLoad"
                    | "onLoadCapture"
                    | "onError"
                    | "onErrorCapture"
                    | "onKeyDown"
                    | "onKeyDownCapture"
                    | "onKeyPress"
                    | "onKeyPressCapture"
                    | "onKeyUp"
                    | "onKeyUpCapture"
                    | "onAbort"
                    | "onAbortCapture"
                    | "onCanPlay"
                    | "onCanPlayCapture"
                    | "onCanPlayThrough"
                    | "onCanPlayThroughCapture"
                    | "onDurationChange"
                    | "onDurationChangeCapture"
                    | "onEmptied"
                    | "onEmptiedCapture"
                    | "onEncrypted"
                    | "onEncryptedCapture"
                    | "onEnded"
                    | "onEndedCapture"
                    | "onLoadedData"
                    | "onLoadedDataCapture"
                    | "onLoadedMetadata"
                    | "onLoadedMetadataCapture"
                    | "onLoadStart"
                    | "onLoadStartCapture"
                    | "onPause"
                    | "onPauseCapture"
                    | "onPlay"
                    | "onPlayCapture"
                    | "onPlaying"
                    | "onPlayingCapture"
                    | "onProgress"
                    | "onProgressCapture"
                    | "onRateChange"
                    | "onRateChangeCapture"
                    | "onSeeked"
                    | "onSeekedCapture"
                    | "onSeeking"
                    | "onSeekingCapture"
                    | "onStalled"
                    | "onStalledCapture"
                    | "onSuspend"
                    | "onSuspendCapture"
                    | "onTimeUpdate"
                    | "onTimeUpdateCapture"
                    | "onVolumeChange"
                    | "onVolumeChangeCapture"
                    | "onWaiting"
                    | "onWaitingCapture"
                    | "onAuxClick"
                    | "onAuxClickCapture"
                    | "onClick"
                    | "onClickCapture"
                    | "onContextMenu"
                    | "onContextMenuCapture"
                    | "onDoubleClick"
                    | "onDoubleClickCapture"
                    | "onDrag"
                    | "onDragCapture"
                    | "onDragEnd"
                    | "onDragEndCapture"
                    | "onDragEnter"
                    | "onDragEnterCapture"
                    | "onDragExit"
                    | "onDragExitCapture"
                    | "onDragLeave"
                    | "onDragLeaveCapture"
                    | "onDragOver"
                    | "onDragOverCapture"
                    | "onDragStart"
                    | "onDragStartCapture"
                    | "onDrop"
                    | "onDropCapture"
                    | "onMouseDown"
                    | "onMouseDownCapture"
                    | "onMouseEnter"
                    | "onMouseLeave"
                    | "onMouseMove"
                    | "onMouseMoveCapture"
                    | "onMouseOut"
                    | "onMouseOutCapture"
                    | "onMouseOver"
                    | "onMouseOverCapture"
                    | "onMouseUp"
                    | "onMouseUpCapture"
                    | "onSelect"
                    | "onSelectCapture"
                    | "onTouchCancel"
                    | "onTouchCancelCapture"
                    | "onTouchEnd"
                    | "onTouchEndCapture"
                    | "onTouchMove"
                    | "onTouchMoveCapture"
                    | "onTouchStart"
                    | "onTouchStartCapture"
                    | "onPointerDown"
                    | "onPointerDownCapture"
                    | "onPointerMove"
                    | "onPointerMoveCapture"
                    | "onPointerUp"
                    | "onPointerUpCapture"
                    | "onPointerCancel"
                    | "onPointerCancelCapture"
                    | "onPointerEnter"
                    | "onPointerLeave"
                    | "onPointerOver"
                    | "onPointerOverCapture"
                    | "onPointerOut"
                    | "onPointerOutCapture"
                    | "onGotPointerCapture"
                    | "onGotPointerCaptureCapture"
                    | "onLostPointerCapture"
                    | "onLostPointerCaptureCapture"
                    | "onScroll"
                    | "onScrollCapture"
                    | "onScrollEnd"
                    | "onScrollEndCapture"
                    | "onWheel"
                    | "onWheelCapture"
                    | "onAnimationStart"
                    | "onAnimationStartCapture"
                    | "onAnimationEnd"
                    | "onAnimationEndCapture"
                    | "onAnimationIteration"
                    | "onAnimationIterationCapture"
                    | "onToggle"
                    | "onBeforeToggle"
                    | "onTransitionCancel"
                    | "onTransitionCancelCapture"
                    | "onTransitionEnd"
                    | "onTransitionEndCapture"
                    | "onTransitionRun"
                    | "onTransitionRunCapture"
                    | "onTransitionStart"
                    | "onTransitionStartCapture"
                    | "exit"
                    | "open"
                    | "enter"
                    | "slots"
                    | "slotProps"
                    | "in"
                    | "mountOnEnter"
                    | "unmountOnExit"
                    | "timeout"
                    | "easing"
                    | "addEndListener"
                    | "disablePrefersReducedMotion"
                    | "onEnter"
                    | "onEntering"
                    | "onEntered"
                    | "onExit"
                    | "onExiting"
                    | "onExited"
                    | "appear"
                    | "invisible",
            >;
            paper?: PaperProps;
            transition?: TransitionProps;
        };
        slots?: DialogSlots & {
            paper?: ComponentType<PaperProps>;
            transition?: ComponentType<TransitionProps>;
        };
        startHidden?: boolean;
        suspendModal?: boolean;
        title?: string;
        TransitionProps?: TransitionProps;
        type?: NotifierType;
    }

    Type Parameters

    • T = any
    • C = any

    Hierarchy

    • ShowOptionsOptions<T, C>
    • Omit<InternalWindowProps<T, C>, "style" | "onInput" | "autoFocus" | "onKeyDown">
      • OptionsDialogProps
    Index
    autoFocus?: string | boolean | FocusWindowOptions

    Query selector for the element to focus on show.

    autoFocusSel?: string

    Query selector for the element to focus on show.

    It would be better to honor autoFocus attribute but React is 'hiding' it

    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.

    initialPosition?: RelativePoint

    A default position for the window. The default is center at %50, %50.

    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
    
    onCancel?: () => void
    onDone?: (results?: any) => void
    onHide?: () => void
    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.

    onShow?: () => void
    onShown?: (internalWindow: IInternalWindowElement) => void
    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).

    open?: boolean
    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
    
    restoreFocus?: boolean | (() => boolean)

    Whether closing returns the keyboard to whatever held it when the window opened.

    false leaves focus alone — for a window whose OUTCOME moves the keyboard itself (Insert Function seeds =NAME( and puts the user in the cell's editor). The restore is a queued frame, so it lands after the new owner has taken focus and quietly takes it away again.

    A thunk is read as the window exits, which is what a window whose answer depends on how it was dismissed needs — cancel restores, an insert that starts an edit does not. A boolean would have to be in state, and there is no guaranteed render between the option being taken and the exit transition starting.

    true
    
    revealToken?: number

    Monotonic token bumped by the host each time a keep-alive window should re-show. An effect re-reveals the window whenever this changes. Prop-based (not imperative on the DOM element, whose identity is fragile across re-renders/StrictMode) and survives updateModal (which only strips open). Ignored on first mount.

    slotProps?: {
        backdrop?: BackdropOwnProps & CommonProps & Omit<
            DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>,

                | "color"
                | "content"
                | "transitionDuration"
                | "translate"
                | "className"
                | "style"
                | "classes"
                | "children"
                | "sx"
                | "slot"
                | "title"
                | "ref"
                | "defaultChecked"
                | "defaultValue"
                | "suppressContentEditableWarning"
                | "suppressHydrationWarning"
                | "accessKey"
                | "autoCapitalize"
                | "autoFocus"
                | "contentEditable"
                | "contextMenu"
                | "dir"
                | "draggable"
                | "enterKeyHint"
                | "hidden"
                | "id"
                | "lang"
                | "nonce"
                | "spellCheck"
                | "tabIndex"
                | "radioGroup"
                | "role"
                | "about"
                | "datatype"
                | "inlist"
                | "prefix"
                | "property"
                | "rel"
                | "resource"
                | "rev"
                | "typeof"
                | "vocab"
                | "autoCorrect"
                | "autoSave"
                | "itemProp"
                | "itemScope"
                | "itemType"
                | "itemID"
                | "itemRef"
                | "results"
                | "security"
                | "unselectable"
                | "popover"
                | "popoverTargetAction"
                | "popoverTarget"
                | "inert"
                | "inputMode"
                | "is"
                | "exportparts"
                | "part"
                | "aria-activedescendant"
                | "aria-atomic"
                | "aria-autocomplete"
                | "aria-braillelabel"
                | "aria-brailleroledescription"
                | "aria-busy"
                | "aria-checked"
                | "aria-colcount"
                | "aria-colindex"
                | "aria-colindextext"
                | "aria-colspan"
                | "aria-controls"
                | "aria-current"
                | "aria-describedby"
                | "aria-description"
                | "aria-details"
                | "aria-disabled"
                | "aria-dropeffect"
                | "aria-errormessage"
                | "aria-expanded"
                | "aria-flowto"
                | "aria-grabbed"
                | "aria-haspopup"
                | "aria-hidden"
                | "aria-invalid"
                | "aria-keyshortcuts"
                | "aria-label"
                | "aria-labelledby"
                | "aria-level"
                | "aria-live"
                | "aria-modal"
                | "aria-multiline"
                | "aria-multiselectable"
                | "aria-orientation"
                | "aria-owns"
                | "aria-placeholder"
                | "aria-posinset"
                | "aria-pressed"
                | "aria-readonly"
                | "aria-relevant"
                | "aria-required"
                | "aria-roledescription"
                | "aria-rowcount"
                | "aria-rowindex"
                | "aria-rowindextext"
                | "aria-rowspan"
                | "aria-selected"
                | "aria-setsize"
                | "aria-sort"
                | "aria-valuemax"
                | "aria-valuemin"
                | "aria-valuenow"
                | "aria-valuetext"
                | "dangerouslySetInnerHTML"
                | "onCopy"
                | "onCopyCapture"
                | "onCut"
                | "onCutCapture"
                | "onPaste"
                | "onPasteCapture"
                | "onCompositionEnd"
                | "onCompositionEndCapture"
                | "onCompositionStart"
                | "onCompositionStartCapture"
                | "onCompositionUpdate"
                | "onCompositionUpdateCapture"
                | "onFocus"
                | "onFocusCapture"
                | "onBlur"
                | "onBlurCapture"
                | "onChange"
                | "onChangeCapture"
                | "onBeforeInput"
                | "onBeforeInputCapture"
                | "onInput"
                | "onInputCapture"
                | "onReset"
                | "onResetCapture"
                | "onSubmit"
                | "onSubmitCapture"
                | "onInvalid"
                | "onInvalidCapture"
                | "onLoad"
                | "onLoadCapture"
                | "onError"
                | "onErrorCapture"
                | "onKeyDown"
                | "onKeyDownCapture"
                | "onKeyPress"
                | "onKeyPressCapture"
                | "onKeyUp"
                | "onKeyUpCapture"
                | "onAbort"
                | "onAbortCapture"
                | "onCanPlay"
                | "onCanPlayCapture"
                | "onCanPlayThrough"
                | "onCanPlayThroughCapture"
                | "onDurationChange"
                | "onDurationChangeCapture"
                | "onEmptied"
                | "onEmptiedCapture"
                | "onEncrypted"
                | "onEncryptedCapture"
                | "onEnded"
                | "onEndedCapture"
                | "onLoadedData"
                | "onLoadedDataCapture"
                | "onLoadedMetadata"
                | "onLoadedMetadataCapture"
                | "onLoadStart"
                | "onLoadStartCapture"
                | "onPause"
                | "onPauseCapture"
                | "onPlay"
                | "onPlayCapture"
                | "onPlaying"
                | "onPlayingCapture"
                | "onProgress"
                | "onProgressCapture"
                | "onRateChange"
                | "onRateChangeCapture"
                | "onSeeked"
                | "onSeekedCapture"
                | "onSeeking"
                | "onSeekingCapture"
                | "onStalled"
                | "onStalledCapture"
                | "onSuspend"
                | "onSuspendCapture"
                | "onTimeUpdate"
                | "onTimeUpdateCapture"
                | "onVolumeChange"
                | "onVolumeChangeCapture"
                | "onWaiting"
                | "onWaitingCapture"
                | "onAuxClick"
                | "onAuxClickCapture"
                | "onClick"
                | "onClickCapture"
                | "onContextMenu"
                | "onContextMenuCapture"
                | "onDoubleClick"
                | "onDoubleClickCapture"
                | "onDrag"
                | "onDragCapture"
                | "onDragEnd"
                | "onDragEndCapture"
                | "onDragEnter"
                | "onDragEnterCapture"
                | "onDragExit"
                | "onDragExitCapture"
                | "onDragLeave"
                | "onDragLeaveCapture"
                | "onDragOver"
                | "onDragOverCapture"
                | "onDragStart"
                | "onDragStartCapture"
                | "onDrop"
                | "onDropCapture"
                | "onMouseDown"
                | "onMouseDownCapture"
                | "onMouseEnter"
                | "onMouseLeave"
                | "onMouseMove"
                | "onMouseMoveCapture"
                | "onMouseOut"
                | "onMouseOutCapture"
                | "onMouseOver"
                | "onMouseOverCapture"
                | "onMouseUp"
                | "onMouseUpCapture"
                | "onSelect"
                | "onSelectCapture"
                | "onTouchCancel"
                | "onTouchCancelCapture"
                | "onTouchEnd"
                | "onTouchEndCapture"
                | "onTouchMove"
                | "onTouchMoveCapture"
                | "onTouchStart"
                | "onTouchStartCapture"
                | "onPointerDown"
                | "onPointerDownCapture"
                | "onPointerMove"
                | "onPointerMoveCapture"
                | "onPointerUp"
                | "onPointerUpCapture"
                | "onPointerCancel"
                | "onPointerCancelCapture"
                | "onPointerEnter"
                | "onPointerLeave"
                | "onPointerOver"
                | "onPointerOverCapture"
                | "onPointerOut"
                | "onPointerOutCapture"
                | "onGotPointerCapture"
                | "onGotPointerCaptureCapture"
                | "onLostPointerCapture"
                | "onLostPointerCaptureCapture"
                | "onScroll"
                | "onScrollCapture"
                | "onScrollEnd"
                | "onScrollEndCapture"
                | "onWheel"
                | "onWheelCapture"
                | "onAnimationStart"
                | "onAnimationStartCapture"
                | "onAnimationEnd"
                | "onAnimationEndCapture"
                | "onAnimationIteration"
                | "onAnimationIterationCapture"
                | "onToggle"
                | "onBeforeToggle"
                | "onTransitionCancel"
                | "onTransitionCancelCapture"
                | "onTransitionEnd"
                | "onTransitionEndCapture"
                | "onTransitionRun"
                | "onTransitionRunCapture"
                | "onTransitionStart"
                | "onTransitionStartCapture"
                | "exit"
                | "open"
                | "enter"
                | "slots"
                | "slotProps"
                | "in"
                | "mountOnEnter"
                | "unmountOnExit"
                | "timeout"
                | "easing"
                | "addEndListener"
                | "disablePrefersReducedMotion"
                | "onEnter"
                | "onEntering"
                | "onEntered"
                | "onExit"
                | "onExiting"
                | "onExited"
                | "appear"
                | "invisible",
        >;
        paper?: PaperProps;
        transition?: TransitionProps;
    }

    The extra props for the slot components. You can override the existing props or add new ones.

    {}
    
    slots?: DialogSlots & {
        paper?: ComponentType<PaperProps>;
        transition?: ComponentType<TransitionProps>;
    }

    The components used for each slot inside.

    {}
    
    startHidden?: boolean

    Mount hidden and suppress the initial auto-reveal (used for prewarming — mounting + positioning a keep-alive window ahead of its first real open). The window stays hidden until revealToken is bumped (or this flips false). Needed because mui-modal-provider's SHOW force-sets open:true, so open alone can't keep a prewarmed window hidden.

    false
    
    suspendModal?: boolean

    Temporarily SUSPEND the modality of an isModal window: the backdrop is not rendered, so the application behind stays clickable, while the window itself remains open, visible and draggable. The focus trap is already soft (it only enforces while the window has focus), so focus may move to the application and back freely.

    The Excel "RefEdit" pattern: a dialog hosting a reference field flips this on while the field is PICKING (reference point mode), so a grid/header click reaches the sheet instead of the backdrop (which would otherwise swallow — and cancel on — the click), and off again when the pick ends.

    false
    
    title?: string

    The title of the options panel

    TransitionProps?: TransitionProps

    v9 removed TransitionProps from DialogProps. Retained here only because useModal (mui-modal-provider) still injects it; it is mapped onto slotProps.transition internally.

    type?: NotifierType

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