Closed tinnguyen1296 closed 2 years ago
Hi there, I have upload image field using react-images-uploading and I want to check "required field" from react-hook-form for upload image field. But I cannot use onChange event from two Please help me. Thanks.
I uploaded codesandbox --> https://codesandbox.io/s/eloquent-lake-j55q9
Hi @tinnguyen1296, have you resolved it? Because this is a Controlled component (it's different with uncontrolled components like .. ) so you need to use Controller component of react-hook-form
to wrap react-images-uploading
component. you should refer here: https://react-hook-form.com/api/usecontroller/controller
Sorry for my late reply. Hope it is helpful for you, thank you!
Hi there, I have upload image field using react-images-uploading and I want to check "required field" from react-hook-form for upload image field. But I cannot use onChange event from two Please help me. Thanks.