hurt-tomatoH
Refine3y ago
11 replies
hurt-tomato

Module '"@refinedev/react-hook-form"' has no exported member 'Controller'.

Hey, so I've copied out the code generated by MuiCreateInferencer for my edit page. For one of my fields, which is called isActive, it's generated the following code.

import { useForm, Controller } from "@refinedev/react-hook-form";
<Controller
                    control={control}
                    name="isActive"
                    // eslint-disable-next-line
                    defaultValue={null as any}
                    render={({ field }) => (
                        <FormControlLabel
                            label="Is Active"
                            control={
                                <Checkbox
                                    {...field}
                                    checked={field.value}
                                    onChange={(event) => {
                                        field.onChange(event.target.checked);
                                    }}
                                />
                            }
                        />
                    )}
                />


But Controller isn't in react-hook-form it seems?

Using v4 FYI.
Was this page helpful?