-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
❌ DEFAULT VALUES DON'T WORK ❌ #1967
Comments
May be worth checking what the first value passed for 'defaultStudents' is eg:
|
@aronedwards91 When I write hard coded default values, it works, but with dynamic data, doesn't work |
Does sound like a cached value could be an issue, maybe provide .reset() with the new 'defaultValues' ? |
@aronedwards91 which data is cached? |
Possibly the initial defaultValues |
@aronedwards91 they're talking about the select component, I'm dealing with a checkbox |
I have ran into a checkbox issue like this before but on a different UI library (Chakra), and I am not sure if it was specific to the UI library. In my case the checkbox was being controlled by a some condition based on user interactions somewhere else on the site - so not through a user manually clicking the checkbox. My hack was to set the key of the checkbox to the |
I'm facing the same problem. The input is of type text. The problem disappear when I provide a default Values, but it's very awful in a big form. @aymanechaaba1 how did you deal with it? |
I got this problem, too. |
Is this problem still going on? I think this is critical issue. |
@jackypan1989 @0Chan-smc That works for me now |
This issue is related to how you are using
|
@NatanCieplinski You're right, the issue is a react-hook-form issue, and default values need to be defined. |
The text was updated successfully, but these errors were encountered: