Line

ui/client/features/review/hooks/useTreeNavigation

Cockpit client (features), v0.9. Source: ui/client/features/review/hooks/useTreeNavigation.tsx.

Functions#

useTreeNavigation()#

useTreeNavigation(nodes, selectedPath, onSelect): TreeNavProps

Defined in: ui/client/features/review/hooks/useTreeNavigation.tsx:14

The changed-units tree's keyboard state: which parents are open, which row is the ONE tab stop, and the key handling. What each key means is the pure model in domain/TreeNav.ts; this hook only holds the state and moves DOM focus. Parents start open (the whole change is visible until you fold it).

Parameters#

nodes

TreeNodeView[]

selectedPath

string | null

onSelect

(path) => void

Returns#

TreeNavProps