How can I use react-hook-form on antd inputs ?
usually its like this
const {
register,
handleSubmit,
formState: { errors },
} = useForm({
defaultValues: {
firstName: "",
lastName: "",
email: "",
phoneNumber: "",
password: "",
},
});
const onSubmit = (data) => console.log(data);
// Render
<Input
{...register("firstName")}
className="my-2"
placeholder="First Name *"
/>
it works ok with MUI Text Field but not with Antd Input.
i only get empty string;
I Would really appreciate some help