UNPKG

at-react-autocomplete-1

Version:

An auto complete dropdown component for React with TypeScript support.

22 lines (19 loc) 848 B
import React from 'react'; interface AutocompleteProps<T> { suggestions: T[]; onSelect: (item: T) => void; onInputChange: (value: string) => void; renderItem?: (item: T) => React.ReactNode; getDisplayValue?: (item: T) => string; onEnter?: (inputValue: string) => void; isLoading?: boolean; className?: string; inputClassName?: string; placeholder?: string; inputValue?: string; setInputValue?: (value: string) => void; minSearchLength?: number; debounceDelay?: number; } declare function AutocompleteDropdown<T>({ suggestions, onSelect, onInputChange, renderItem, getDisplayValue, placeholder, isLoading, inputValue, setInputValue, minSearchLength, debounceDelay, className, inputClassName, onEnter, }: AutocompleteProps<T>): React.ReactElement; export { AutocompleteDropdown as default };