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
event.preventDefault is not a function in onChange(event, value, previousValue, name) #4548
Comments
@tohbansoon Can you please create a https://codesandbox.io that will replicate the problem? |
@iamandrewluca https://codesandbox.io/s/broken-wave-zqz0k?fontsize=14 here it is. I just got the same problem. It doesn't work with react-select |
Hey guys, having the same problem. I think this behaviour was introdured here: This leads to inconsistent onChange bahaviour on Fields, because I have to know if my render component supports events or not. Not sure how to handle this consistently. |
@mateioprea thanks for the sandbox, it illustrates the problem very well. @iamandrewluca do you have insights on this. I have a pretty form heavy application and this change breaks them all over the place. Any suggestion on how to change this? |
@mateioprea that's a good start and I will try that later :) Thanks for that! Would be nice to know if there is a migration path with the official release. I'm also don't understand how to stop the propagation to the store when no event is present. |
I have the same issue. After switch to the 8.^.^ event it's a value not event. |
@Iuriy-Budnikov what's your version? could you confirm if |
@renatoagds here an example with react select https://codesandbox.io/s/strange-glitter-j3ipz |
For many of my inputs, I'm calling It is possible to fix this by updating my inputs to call There are likely ways to work around this, but it seems like this wasn't an intended change. Or if it was, the documentation should at least make it clear that in order to receive the event in the Field.onchange handler, you need to pass an event to input.onChange from within the input. |
Just want to note, this is still an issue in 8.3.7 Appreciate any work being put into this :) |
Sill an issue with |
after upgrade
react-redux
to version7.1.1
andredux-form
to version8.2.6
...i found that preventDefault object is missing from the event params...
Here is my code...
in
"redux-form": "^7.2.0"
and"react-redux": "^5.0.7"
:console.log(event) can see the
preventDefault: ƒ preventDefault()
in
redux-form": "^8.2.6"
and"react-redux": "^7.1.1"
:console.log(event) do not have
preventDefault: ƒ preventDefault()
this in result
event.preventDefault()
is not a function and break the application!The text was updated successfully, but these errors were encountered: