import React from 'react'; import Autosuggest, { RenderSuggestionParams } from 'react-autosuggest'; import FieldBase, { IPropsFieldBase, IStateFieldBase } from '../Base'; interface IState extends IStateFieldBase { term: string; value: string; suggestions: IProps['options'][0][]; } interface IProps extends IPropsFieldBase { value: any; onChange: (value: any) => void; options: { value: any; label: string; }[]; } export default class FieldAutocomplete extends FieldBase { constructor(props: IProps); static getDerivedStateFromProps(nextProps: IProps, currentState: IState): IState; onChange: (value: any) => void; getSuggestionValue: (suggestion: { value: any; label: string; }) => string; handleChange: (event: React.FormEvent, params?: Autosuggest.ChangeEvent) => void; handleBlur: () => void; handleSelected: (event: React.FormEvent, data: Autosuggest.SuggestionSelectedEventData<{ value: any; label: string; }>) => void; handleSuggestionsFetchRequested: ({ value }: Autosuggest.SuggestionsFetchRequestedParams) => void; handleSuggestionsClearRequested: () => void; handleClearValue: () => void; render(): JSX.Element; renderSuggestion(suggestion: IProps['options'][0], { query, isHighlighted }: RenderSuggestionParams): JSX.Element; } export {};