Answer the question
In order to leave comments, you need to log in
Why is the template not updated after deleting a record?
Making the "load more" functionality for the list instead of pagination
Code for the 'loadMore' action:
this.store.findQuery('user', {
skip: _this.get('skipped'),
limit: _this.get('limit'),
sort: _this.get('sort')
}).then(function(newData) {
_this.get('model').pushObjects(newData.get('content'));
_this.set('model.meta.total', newData.get('meta.total'));
_this.set('skipped', _this.get('skipped') + _this.get('limit'));
});
remove: function(item) {
item.destroyRecord();
},
{{#each model as |row|}}
<tr>
<a {{action 'remove' row}}>remove</a>
</tr>
{{/each}}
<a {{action 'loadMore'}}>loadMore</a>
Answer the question
In order to leave comments, you need to log in
You can do this in the controller:this.notifyPropertyChange('model');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question