Skip to content
Entangle UI v0.13.0

UseListboxNavReturn

Defined in: src/hooks/useListboxNav/useListboxNav.ts:42

activeIndex: number

Defined in: src/hooks/useListboxNav/useListboxNav.ts:44

Currently active index, or -1 when none.


first: () => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:52

Activate the first non-disabled item.

void


handleKeyDown: (event) => boolean

Defined in: src/hooks/useListboxNav/useListboxNav.ts:61

Single keyboard handler for ArrowUp/Down/Home/End/Enter/Escape. Returns true when the event was handled (and preventDefault was called).

KeyboardEvent | KeyboardEvent<Element>

boolean


last: () => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:54

Activate the last non-disabled item.

void


navigableIndices: number[]

Defined in: src/hooks/useListboxNav/useListboxNav.ts:63

Snapshot of the navigable indices (non-disabled, in order).


next: () => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:48

Move to the next non-disabled item.

void


prev: () => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:50

Move to the previous non-disabled item.

void


selectActive: () => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:56

Commit the active item via onSelect.

void


setActiveIndex: (index) => void

Defined in: src/hooks/useListboxNav/useListboxNav.ts:46

Direct setter; the value is not validated.

number

void