react-hook-form error: transformToNestObject is not a function
react-hook-form error: transformToNestObject is not a function
我想使用 Material-UI 单选按钮,在 react-hook-form
更新验证后抛出以下错误:
transformToNestObject is not a function
Controller
包装器不正确吗?
<Controller
render={({ field, fieldState }) => (
<RadioGroup {...field} aria-label="option">
<FormControlLabel
value="A"
control={<Radio size="small" color="primary" />}
label="A"
/>
<FormControlLabel
value="B"
control={<Radio size="small" color="primary" />}
label="B"
/>
</RadioGroup>
)}
name="option"
control={control}
/>
尝试将 @hookform/resolvers
包升级到最新版本。 Source.
我想使用 Material-UI 单选按钮,在 react-hook-form
更新验证后抛出以下错误:
transformToNestObject is not a function
Controller
包装器不正确吗?
<Controller
render={({ field, fieldState }) => (
<RadioGroup {...field} aria-label="option">
<FormControlLabel
value="A"
control={<Radio size="small" color="primary" />}
label="A"
/>
<FormControlLabel
value="B"
control={<Radio size="small" color="primary" />}
label="B"
/>
</RadioGroup>
)}
name="option"
control={control}
/>
尝试将 @hookform/resolvers
包升级到最新版本。 Source.