-
Notifications
You must be signed in to change notification settings - Fork 410
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
onValueChange with function #429
Comments
Hello, i have approximately the same problem. When the props value change the onValueChange is fired !! It creates infinite loop when an input update another input vice versa. |
+1 Have same problem. |
Is the infinite loop issue still persist? A code snippet might help for this. Plus we can start passing the source of onValueChange, whether it's caused by prop change or actual input change. I think we can pass the source object as 2nd parameter to onValueChange. Something like. {
source: 'prop'|'event',
event: eventObj, // only set when the source is event.
} |
@s-yadav |
This 2nd argument thing is not added till now. But can be added. |
We have extended the |
I have a function that calculates the balance due, so onValueChange I put this function, but in the initial state of the component it executes the function.
I tried using onChange, but it doesn't have floatValues, sometimes it does and sometimes 'undefined'.
How could I perform the calculation function only when the user changes the value and not the initial state of react using formik?
The text was updated successfully, but these errors were encountered: