It would be better to honor autoFocus attribute but React is 'hiding' it
OptionaldisableAutoDestroy
disableAutoDestroy?:boolean
When true this window is kept mounted after it closes so it can be reused (re-shown by bumping
InternalWindowProps.revealToken) instead of destroyed and rebuilt. This both makes
re-open instant and preserves position + content state.
Remarks
mui-modal-provider@2.4.6 wires TransitionProps.onExited -> destroy whenever destroyOnClose
is false (its issue #78), so a keep-alive window would otherwise be destroyed on the exit
transition anyway. When this is set we skip forwarding onExited to that destroyer.
Whether closing returns the keyboard to whatever held it when the window opened.
Remarks
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.
Default Value
true
OptionalrevealToken
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.
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.
Default Value
false
OptionalsuspendModal
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.
Remarks
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.
Default Value
false
Optionaltitle
title?:string
The dialog title
OptionalTransitionProps
TransitionProps?:TransitionProps
Deprecated
v9 removed TransitionProps from DialogProps. Retained here
only because useModal (mui-modal-provider) still injects it; it is mapped
onto slotProps.transition internally.
Query selector for the element to focus on show.