UNPKG

490 BTypeScriptView Raw
1import * as React from 'react';
2/**
3 * @ignore - internal hook.
4 *
5 * Provides a handler for text navigation.
6 * It's used to navigate a list by typing the first letters of the options.
7 *
8 * @param callback A function to be called when the navigation should be performed.
9 * @returns A function to be used in a keydown event handler.
10 */
11export declare function useTextNavigation(callback: (searchString: string, event: React.KeyboardEvent) => void): (event: React.KeyboardEvent) => void;