Replies: 1 comment 4 replies
-
I haven't got a chance to read through all the above, maybe |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello i have a form that has image input, width input, height input, when i upload an image i get it's dimensions then i setValue of width && height, also i have a button called ratio lock, when enabled width must change if i change height and height must change when i change width to avoid losing image ratio.
The problem is that i have a custom input built with useController and am using useEffect in the place where am calling my customInput and my code goes infinite loop.
My custom numericInput.js
My app.js
After searching in RHF community i found an example about inputs depending https://codesandbox.io/s/late-cdn-44cfzm
my case using the same way and it's work without the need of useEffect and without infinite loop https://codesandbox.io/s/affectionate-cdn-6s5rlh
So my question is how i can i do the same thing in my numericInput.js Component.
Here is how my original form looks like :

Beta Was this translation helpful? Give feedback.
All reactions