@matthew.ngo/react-form-kit
Version:
Form Kit for React. It consists of a set of components that can be used to create complex forms in a simple and declarative way.
11 lines (10 loc) • 614 B
TypeScript
import { SelectOption, SelectOptionGroup } from './types';
export declare const useSearch: (options: SelectOption[] | SelectOptionGroup[], debounceTime?: number) => {
searchTerm: string;
setSearchTerm: import("react").Dispatch<import("react").SetStateAction<string>>;
filteredOptions: SelectOption[] | SelectOptionGroup[];
};
export declare const useKeyboardNavigation: (optionsLength: number, isOpen: boolean, onSelect: (index: number) => void, closeDropdown: () => void) => {
highlightedIndex: number;
setHighlightedIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
};