In my app I need to filter a list by one or more properties then sort the filtered results by one or more properties. I’ve accomplished this with
sortProperties: ['manufacturer:asc', 'modelName:asc', 'series:asc'],
filteredContent: Ember.computed.filter('model', function (model) {
return model.get('isActive');
}).property('model.@each.isActive'),
sortedContent: Ember.computed.sort('filteredContent', 'sortProperties').property('filteredContent')
The template binds to sortedContent
via a normal {{#each item in sortedContent}}
My issues come when trying to edit an item in that list. Editing the first two items in the list is fine - changing the fields shows the changes in the list with no issues. The problem comes when editing anything lower than the first two items. Any changes get reflected on the proper item as well as other items in the list.
I’ve created a jsbin that shows the issue. I’m not sure if I’m just missing something on how I’m filtering/sorting/binding or if this is a bug within Ember.