ui/client/features/shell/hooks/useTabHost
Cockpit client (features), next. Source: ui/client/features/shell/hooks/useTabHost.tsx.
Functions#
useTabHost()#
useTabHost(
tabs,activeId,onSelect):object
Defined in: ui/client/features/shell/hooks/useTabHost.tsx:10
Which tab is showing, and the tablist keyboard handler (roving focus: Left/Right/Home/End move focus AND select, as the design's tabs are cheap).
Parameters#
tabs
ShellTab[]
activeId
string | null
onSelect
(id) => void
Returns#
object
active
active:
ShellTab|null
listRef
listRef:
RefObject<HTMLDivElement|null>
onKeyDown
onKeyDown: (
e,currentId) =>void
Parameters
e
KeyboardEvent<HTMLElement>
currentId
string
Returns
void