-
-
Notifications
You must be signed in to change notification settings - Fork 140
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
Changeset doesn't set boolean property with a default value #519
Comments
Please note - the setting only breaks when there is a default value that is a boolean. If the property is initialized as undefined, there is no breakage with setting. |
I updated the twiddle with a workaround. The error is the UPDATE - unfortunately this doesn't work with the old Ember reactive model so not sure what I can do. We're in a situation where some forms use the old model and others use the newer. UPDATE - I updated the gist to guard just on boolean types. That gives me the behavior that I want. Not really sure about the root cause. |
As an aside, the Readme seems to have incorrect instructions for extending from base and how to pass in options. UPDATE - types are also busted. There is no |
ref #516 I believe this was fixed in the 3.20-beta series of Ember.js.
Fixed! |
Thanks @snewcomer ! Can you explain how the Ember issue fixes the issue that I was seeing with setting boolean values on the changeset? |
Basically, there is a "cache" in |
Thanks. That makes sense. I'll close this issue and wait for 3.20 to be released. |
Version
3.7.1
Steps to reproduce
Initialize a new Changeset with a boolean property with a default value.
Replication
https://ember-twiddle.com/c3ab24b800d2fbebcde9b0a9bc1cdef2?openFiles=controllers.application%5C.js%2C
Expected Behavior
The property value will toggle from true, to false, back to true.
Actual Behavior
The property toggles initially from false to true, to false, then stays stuck at false
The text was updated successfully, but these errors were encountered: