-
Notifications
You must be signed in to change notification settings - Fork 419
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
Listen to input changes event only, while retaining access to the raw values in the callback #587
Comments
Humm, the reason we don't want to do it onChange is that, onChange doesn't get called on all cases. Like value can change due to multiple source, prop change, input change, blur. so onChange might not receive all the updates. Also changing the semantic of onChange shouldn't be done. But I think we can add the source information in the second param of onValueChange, like mentioned in We will add this, as this is most asked requirement. |
@nikhil-varma, can you look into this.? |
@s-yadav sure! |
@DekelYossef We have extended the |
Will do! thank you guys! |
Hi,
I'm trying to listen to user changes explicitly, and not to every value change due other event types or prop changes, and to get the
values.value
orvalues.floatValue
in a callback for easy parsing and handling.What would be the right way to do so?
Since I can't access the event object in
onValueChange
, and can't find out what's the source of theonValueChange
which gets triggered for multiple reasons, I can't use it. Other option I see is using the input's onChange handler, but I get the formatted value from it which requires de-formatting to actually parse the value.I re-read the documentation, and searched for similar issues, and all I managed to find was #429, and more specifically, this:
Originally posted by @alexandre033 in #429 (comment)
My case is a bit different since I don't update the input value's state and thus there is no infinite loop, but I do get the
onValueChange
triggered when I don't want it to, and can't filter out the specific events I want to listen to.I would have expected that either I get the
values
object in theonChange
callback or get the source / reason / trigger for theonValueChange
. Is there something I'm missing?Thanks! 🙏🏼
The text was updated successfully, but these errors were encountered: