-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
checkbox field do not trigger change event. Custom onChange passed to props also doesn't work #3369
Comments
I have the same issue with radio input in 7.0.3.
And no change event. |
I created a custom component for radio button, and it works fine without |
Same as @jokezer Here is the working code:
|
I found extremely strange issue with checkboxe's
So when I serve it via browser-sync, event doesn't trigger, but if I serve it via simple node server - event triggers :) So I assume that browser sync adds some code which breaks my code. Has anyone faced such strange behavior? |
@likerRr I observed the same for out code base. I could not find why onChange was not triggered for radio/checkbox inputs but the issue is not occurring in the compiled version. |
Indeed, BrowserSync client seems to have a patch for IE to force change, which is not compatible with redux-form:
A quick and dirty fix: use browserSync.init({minify: false, ...), and patch the source with:
|
I disabled ghost-mode (https://browsersync.io/docs/options#option-ghostMode) and it seems to work. |
There's a chance this might be fixed in |
I could still reproduce the problem with redux-form v7.1.0 but I think that the problem, at least for me is browser-sync. |
@erikras I too faced the same issue, for checkbox, validation was triggered only after onblur. But this happened when I used state to handle the checked status of checkbox. When I changed the component to stateless it worked fine. |
|
For me the problem was caused by BrowserSync too. |
I'm experiencing this issue with redux form 7.4.2, and it is not due to using browser-sync. The first time that a checkbox is unchecked, it does not dispatch the |
@wahlg did you fin solution? |
Can someone provide a https://codesandbox.io with the issue? I tried but can't reproduce. |
Version: 7.0.3
Check / uncheck doesn't trigger "redux-form/CHANGE" action
The text was updated successfully, but these errors were encountered: