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
{{ message }}
This repository was archived by the owner on Dec 23, 2018. It is now read-only.
Perhaps I am missing some crucial information regarding the data object, it appears to be immutable, so does that mean I must create a snapshot every time I wish to modify it.
varUserModel=Caplet.createModelClass({initialize: function(){console.log('Initialized:',this.data)},onChange: function(data){console.log('Saving Model Data',this.data)},setTokenData: function(token){// here is where it happens, you have to clone it then set itvardata=this.toData(this.data)data.token=tokenreturnthis.set('data',data)}})
The above will invoke onDataChange properly, however, this example will not:
this.set('data.token',token)
Meaning now there are two states on the model, direct properties user.token and user.data.token which are no longer synced.