import TextField from "@mui/material/TextField"; import Autocomplete from "@mui/material/Autocomplete"; export interface InputAutoTextProps { label: string; value: string; options?: string[]; error?: string; onChange: (v: string) => void; } export default function InputAutoText({ value = "", label, options = [], onChange, error, }: InputAutoTextProps) { return onChange( v === null ? "" : v )} renderInput={params => { e.preventDefault(); onChange( e.target.value ) }} />} /> }