import { MultiSelect, Select } from '@mantine/core'; import { ISelect } from '../../../../typings'; import { Control, useController } from 'react-hook-form'; import { FormValues } from '../../InputDialog'; import LibIcon from '../../../../components/LibIcon'; interface Props { row: ISelect; index: number; control: Control; } const SelectField: React.FC = (props) => { const controller = useController({ name: `test.${props.index}.value`, control: props.control, rules: { required: props.row.required }, }); return ( <> {props.row.type === 'select' ? (