downshift
Version:
🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.
10 lines (9 loc) • 414 B
TypeScript
type GetItemIndexByCharacterKeyOptions<Item> = {
keysSoFar: string;
highlightedIndex: number;
items: Item[];
itemToString(item: Item | null): string;
isItemDisabled(item: Item, index: number): boolean;
};
export declare function getItemIndexByCharacterKey<Item>({ keysSoFar, highlightedIndex, items, itemToString, isItemDisabled, }: GetItemIndexByCharacterKeyOptions<Item>): number;
export {};