Line

ui/client/features/command-palette/hooks/usePaletteLifecycle

Cockpit client (features), v0.9. Source: ui/client/features/command-palette/hooks/usePaletteLifecycle.tsx.

Functions#

usePaletteLifecycle()#

usePaletteLifecycle(open, setOpen, dispatch): void

Defined in: ui/client/features/command-palette/hooks/usePaletteLifecycle.tsx:9

Ctrl/Cmd+K toggles the palette; each time it opens the search starts fresh and focus is remembered (before the dialog takes it), then restored on close.

Parameters#

open

boolean

setOpen

(open) => void

dispatch

Dispatch<PaletteAction>

Returns#

void