@harimath wrote:
In my Ember app, I have a hbs template defined as below (simply iterates through an array ‘myContainers’ & prints some fields);
{{#each myContainers as |row|}} {{my-field field=(field-from-section row "SOME_ATTRIBUTE") }} {{/each}}
Also my component JS is as below (Iterates through server response ‘gridItems’ prop & finally returns an array );
myContainers: function(){ var self = this; let gridItems = this.get('secInfo.gridItems'); Ember.set(this.get('secInfo'), 'myRows', Ember.A([])); Ember.set(this.get('secInfo'), 'myRowsToRender', Ember.A([])); this.get('secInfo.myRows').pushObject(gridItems); //Some logic to set array attribute values Ember.set(this.get('secInfo'), 'myRows', this.get('secInfo').myRowsToRender); return this.get('secInfo').myRows; }.property('secInfo.gridItems'),
Now my question is with the above code, everything works fine & I am able to see the data on screen.
But the moment, I try to update my hbs by wrapping in ‘my-accordion’ component;
{{#my-accordion as |accordion|}} {{#accordion.panel id='Panel1' title='Title'}} {{#each myContainers as |row|}} {{my-field field=(my-section row "SOME_ATTRIBUTE") }} {{/each}} {{/accordion.panel}} {{/my-accordion}}
You modified ‘someAttr’ twice in a single render error & I cannot see any data.
PS: It is surely not an issue with the my-accordion component as the same is tested in other places.
Please help.
Posts: 1
Participants: 1