Options
All
  • Public
  • Public/Protected
  • All
Menu

The KeyboardNavigatable class manages lists that can be navigated with the keyboard, calling callbacks for each actions.

This helper encapsulates the key binding logic, providing a simple fluent API for use.

Hierarchy

  • KeyboardNavigatable

Index

Constructors

constructor

Properties

Protected callbacks

callbacks: Map<number, KeyboardEventHandler> = ...

Callback to be executed for a specified input.

Protected whenCallback

whenCallback: ShouldHandle = ...

Callback that determines whether keyboard input should be handled. By default, always handle keyboard navigation.

Methods

bindTo

navigate

  • navigate(event: KeyboardEvent): void

onCancel

onDown

onRemove

onSelect

onTab

onUp

when

Generated using TypeDoc version 0.22.10