ember.js - EmberJS view is not updating when updating an object in an array -
i have handlebars template have table.
<script type="text/x-handlebars" data-template-name="customers"> <table> <tbody> {{#each nomday in allnominationdays}} <tr class="nomdays" {{action "savenomday" nomday on="focusout"}}> <td>{{nomday.confirmedvolume}}</td> <td>{{nomday.variance}}</td> </tr> {{/each}} </tbody> </table> </script>
in controller have function call action savenomday defined on tr.
update: function() { console.log('not working'); allnominationdays = this.get('allnominationdays'); //this.set('allnominationdays',null); allnominationdays.objectat(0).variance = 75; this.set('allnominationdays',allnominationdays); },
but view not changing when change value of object array. if set object array null template updates , shows no table. not sure breaking binding view update?
the code block updates view when in controller function not when called on action. inside action setting array of object null update view , removes entire table. don't know going on. new in emberjs
thanks,
Comments
Post a Comment