import { MultiSelect, Select } from '@mantine/core'; import { ISelect } from '../../../../interfaces/dialog'; import { Control, FieldValues, useController, UseFormRegisterReturn, UseFormSetValue } from 'react-hook-form'; import { FormValues } from '../../InputDialog'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; interface Props { row: ISelect; index: number; control: Control; } const SelectField: React.FC = (props) => { const controller = useController({ name: `test.${props.index}.value`, control: props.control, defaultValue: props.row.default || props.row.type !== 'multi-select' ? props.row.options[0].value : undefined, rules: { required: props.row.required }, }); return ( <> {props.row.type === 'select' ? (