useTypeahead API
Prefix-matches typed characters against a list, accumulates them for one second, and cycles on a repeated letter.
Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| useTypeahead | System |
| useTimer | System |
| useProxyRegistry | Reactivity |
| useProxyModel | Reactivity |
| Select | Forms |
Functions
useTypeahead
(items: () => readonly T[], options: TypeaheadOptions<T>) => TypeaheadReturn<T>Match typed characters against a list.
items is read on every key, in the order given. Matching is a
case-insensitive startsWith against options.text. Text is not trimmed.
Disabled items are not skipped — omit them from items to filter.
Options
duration
MaybeRefOrGetter<number> | undefinedInactivity window before the buffer clears, in milliseconds. Accepts a plain number, ref, or getter — read fresh on each key.
Default: 1000