ui/client/features/list-browser/hooks/useListKeys
Cockpit client (features), v0.8. Source: ui/client/features/list-browser/hooks/useListKeys.tsx.
Functions#
useListKeys()#
useListKeys(
onSelectId):object
Defined in: ui/client/features/list-browser/hooks/useListKeys.tsx:8
Keyboard handling of a listbox with one tab stop: Up/Down/Home/End move focus between the rows, Enter (or Space)
selects the focused one. From the filter box, Down goes to the first row. Rows carry data-list-row.
Parameters#
onSelectId
(id) => void
Returns#
object
filterRef
filterRef:
RefObject<HTMLInputElement|null>
listRef
listRef:
RefObject<HTMLUListElement|null>
onFilterKeyDown
onFilterKeyDown: (
e) =>void
Parameters
e
KeyboardEvent<HTMLInputElement>
Returns
void
onRowKeyDown
onRowKeyDown: (
e) =>void
Parameters
e
KeyboardEvent<HTMLElement>
Returns
void