You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the previous version of canjs, setting a default value in a define object would automatically call a set function on that property, even if the constructor doesn't receive the property.
In the new version, there are probably some changes to how this is set up, because default values do not call the set property. But, if the DefineMap's constructor is passed this property, the set function is called.
It would still be ideal to keep this functionality. I like to use setters to trigger updates to other fields when a value is set whether its set when the map is created using a default value or whether its set by passing the property to the constructor.
The text was updated successfully, but these errors were encountered:
In the previous version of canjs, setting a default
value
in a define object would automatically call aset
function on that property, even if the constructor doesn't receive the property.http://jsbin.com/wicuguwisa/edit?html,js,console,output
In the new version, there are probably some changes to how this is set up, because default values do not call the set property. But, if the DefineMap's constructor is passed this property, the
set
function is called.http://jsbin.com/kepixenonu/edit?html,js,console,output
It would still be ideal to keep this functionality. I like to use setters to trigger updates to other fields when a value is set whether its set when the map is created using a default value or whether its set by passing the property to the constructor.
The text was updated successfully, but these errors were encountered: