Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SearchData<D, E>

The data that is provided to the onChange handler when searching. This will be triggered whenever the user types a letter that causes the current search result to change.

Type parameters

  • D = unknown

  • E: HTMLElement = HTMLElement

Hierarchy

  • SearchData

Index

Properties

index: number

The index in the items array that the found item appears at. This is super useful when extending this hook to be used with aria-activedescendant focus movement or manual focus behavior since the items array should normally be the same indexes as the DOM nodes.

item: D

The item that was matched from the latest search.

items: readonly D[]

The current list of items that were provided to be searched.

query: string

The search value that was used to find this item and trigger the change event.

target: E

The current target for the search keydown event.

Generated using TypeDoc