UNPKG

downshift

Version:

🏎 A set of primitives to build simple, flexible, WAI-ARIA compliant React autocomplete, combobox or select dropdown components.

24 lines (23 loc) 713 B
export type GetInitialStateProps<T> = { items: T[]; isItemDisabled: (item: T, index: number) => boolean; selectedItem?: T | null; initialSelectedItem?: T | null; defaultSelectedItem?: T | null; isOpen?: boolean; initialIsOpen?: boolean; defaultIsOpen?: boolean; highlightedIndex?: number; initialHighlightedIndex?: number; defaultHighlightedIndex?: number; inputValue?: string; initialInputValue?: string; defaultInputValue?: string; itemToKey: (item: T) => string; }; export declare function getInitialState<T>(props: GetInitialStateProps<T>): { highlightedIndex: number; isOpen: boolean; selectedItem: T | null; inputValue: string; };