Line

You are reading the unreleased docs (next). See latest (v0.9)

ui/client/features/pages-editor/hooks/usePagesEditorCommands

Cockpit client (features), next. Source: ui/client/features/pages-editor/hooks/usePagesEditorCommands.tsx.

Functions#

usePagesEditorCommands()#

usePagesEditorCommands(pages, openPageOf): void

Defined in: ui/client/features/pages-editor/hooks/usePagesEditorCommands.tsx:11

Ctrl P quick-open: registers a "Go to page" command per page of the project into the shell's command palette (also opened by Ctrl P, see PaletteBrowser.ts), so typing a feature or file name jumps straight to it. Mounted only while the Pages Editor is (usePagesEditor), so the entries disappear with the screen like the rest of its state.

Parameters#

pages

object[]

openPageOf

(feature, file) => void

Returns#

void