-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typing fast results to max depth issue #441
Comments
Regardless of you code, if the issue was reproducible on the demo page it could be considered a proper bug report but unless it isn’t, it isn’t. |
Same error. |
I resolve this problem using use-debounce react library: https://www.npmjs.com/package/use-debounce I put the onChange function inside a useDebounceCallback, here's an example.
|
same issue with react-hook-form. I tried debounce for onChange handler but it doesn't work.
it seems onChange property of PhoneInput does not override onChange Event. Without onChange, it works when normally typing. Any ideas? |
Did you try to increase the delay of debouncedCallback? |
I am having this issue too on next js and react-hook-form. |
anyone came across this bug by this time? debounce works, just wondering what might be actual issue |
i have same issue |
GustavoLaraSantos's solution is ok. |
anyone fixed this with react-hook-form? Wrapping with debounce did fix the infinite re-render issue. but the text value can't be updated into the react-hook-form state. |
Hi!
If you start typing to fast, it somehow throws a "maximum depth issue".
Input.tsx:
Component.tsx:
I thought it's due to my "validate" rule, but console.log never gets triggered. Just wondering.
When I type slowly, it seems to be working - anyway this shouldn't be the case if I start typing too fast or vice versa.
The text was updated successfully, but these errors were encountered: