Skip to content
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

Changing a checkbox doesn't update the store or UI #7

Closed
supersime opened this issue Nov 9, 2017 · 2 comments
Closed

Changing a checkbox doesn't update the store or UI #7

supersime opened this issue Nov 9, 2017 · 2 comments

Comments

@supersime
Copy link

Have found an issue where a checkbox isn't updating the store (or on the UI).

I used the previous sandbox example you gave for checkbox referenced on this page Toggle, Checkbox, Radio elements not changing checked status. #4 which works fine with semantic-ui-react version 0.71.5.
If you increase the semantic-ui-react version from 0.71.5 to 0.72.0 it still works, however if you increase to 0.73.0 it no longer works!

Issue appears to have been caused by a change in semantic-ui-react v0.73.0, refer to semantic-ui-react issue breaking(Checkbox): callback with new checked value in onClick (#2014) and breaking(Checkbox): callback with new checked value in onClick by areinmeyer - Pull Request #2014 - Semantic-Org/Semantic-UI-React.
This change to redux-form also appears related: Checkbox value breaking pristine state - Issue#2857 - erikras/redux-form.

I think the fix might be in the CheckboxField (and Checkbox) functions, where instead of:
return input.onChange(!data.checked)

it possibly should be:
return input.onChange(!!data.checked)

@supersime supersime changed the title Changing a checkbox doesn't update the store Changing a checkbox doesn't update the store or UI Nov 9, 2017
@ckshekhar
Copy link
Owner

ckshekhar commented Nov 10, 2017

Thanks for pointing out. This issue is resolved in V1.2.1

@ckshekhar ckshekhar reopened this Nov 10, 2017
@supersime
Copy link
Author

Awesome thanks @ckshekhar73 for such a speedy turnaround!

ckshekhar pushed a commit that referenced this issue Dec 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants