mui-rff
Version:
Set of modern wrapper components to facilitate using Material UI with React Final Form
20 lines (19 loc) • 814 B
TypeScript
import { ReactNode } from 'react';
import { FieldProps } from 'react-final-form';
import { TextFieldProps as MuiTextFieldProps } from '@material-ui/core/TextField';
import { AutocompleteProps as MuiAutocompleteProps } from '@material-ui/lab/Autocomplete';
export declare type AutocompleteData = {
[key: string]: any | null;
};
export interface AutocompleteProps extends Partial<Omit<MuiAutocompleteProps<any>, 'onChange'>> {
name: string;
label: ReactNode;
helperText?: string;
required?: boolean;
multiple?: boolean;
getOptionValue?: (option: any) => any;
options: AutocompleteData[];
fieldProps?: Partial<FieldProps<any, any>>;
textFieldProps?: Partial<MuiTextFieldProps>;
}
export declare const Autocomplete: (props: AutocompleteProps) => JSX.Element;