import { FormHelperText } from "@mui/material"; import { Autocomplete, TextField } from "@mui/material"; import { Controller, useFormContext } from "react-hook-form"; type Props = { name: string, label: string, options: string[]; disabled?: boolean, } const RHFAutocompleteNonTerminology = ({ ...props }: Props) => { const { control } = useFormContext(); return ( { let xValue = (value && value.codingCode!=="" ? value : null ); return ( <> { onChange(newValue); }} renderInput={(params) => ( )} /> {!!error && ( {error.message} )} ) }} /> ) } export default RHFAutocompleteNonTerminology