UNPKG

material-form-builder

Version:
35 lines (34 loc) 1.59 kB
/// <reference types="node" /> import { AutocompleteChangeDetails, AutocompleteChangeReason } from '@mui/material'; import React, { Component } from "react"; import { InputImplement } from '../../types/input.implement'; import { AutocompleteInputProps, AutocompleteInputValueType, AutocompleteValueType } from './autocomplete.types'; interface IState { value: AutocompleteValueType | null; error: boolean; } export declare class AutocompleteInput extends Component<AutocompleteInputProps, IState> implements Omit<InputImplement<AutocompleteInputValueType>, 'onChange'> { state: IState; validationTimeout: NodeJS.Timeout | undefined; inputRef: HTMLInputElement | undefined; shouldComponentUpdate(nextProps: AutocompleteInputProps, nextState: IState): boolean; private getValuesFrom; componentDidUpdate(props: AutocompleteInputProps): void; setValue(value: AutocompleteInputValueType): Promise<AutocompleteInputValueType>; getValue(): AutocompleteInputValueType; clear(withoutDefaults?: boolean): Promise<AutocompleteInputValueType>; validation(): boolean; onChange: (_: React.SyntheticEvent, option: any, reason: AutocompleteChangeReason, details?: AutocompleteChangeDetails<any> | undefined) => void; private onClick; click: () => void; focus: () => void; blur: () => void; private optionGetter; private getValueForCheck; private onInputBlur; private renderOption; private getOptionLabel; private isOptionEqualToValue; render(): React.JSX.Element; } export {};