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
Component not reflecting state in store #3061
Comments
It's interesting that if you make the values |
I'm trying to figure out why this was written like this. |
This is related to the hotly contested #1762, #1774, and #1993. I think that @clayne11 is probably correct on this issue. And fixing this will require a breaking change release. |
agree 100% that true, false should be valid values. I also think that null, undefined and |
That's a harder case to make, as an empty field comes back as |
I'm also having this problem. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Are you submitting a bug report or a feature request?
Bug Report
What is the current behavior?
I created a very simple yes / no component mapped to true / false values.
When clicking "No" the value is updated in the store, but the component does not update.
Only after clicking Yes first the component updates when clicking No.
What is the expected behavior?
The component should reflect the store in the state.
Sandbox Link
https://codesandbox.io/s/r06VKjB4K
What's your environment?
redux-form 6.8
redux 3.6
react-redux 5.0.4
Other information
I apologize if this is not a bug, but this seems extremely counter intuitive for users trying to build custom components. My hunch feeling says this is a bug because somewhere the state isn't being strictly compared.
Update:
Adding a formatter or a parser that does nothing (
format={value=>value}
) has a side effect of fixing the problem. This amplifies my feeling that this is in fact a bug.The text was updated successfully, but these errors were encountered: