Skip to content

Ember.computed.sort doesn't update when live RecordArray updates. #12516

Description

@jason21000000

I just upgraded from Ember 1.13 to Ember 2.1. I noticed Ember.computed.sort no longer updates if a live RecordArray updates.

For example, if I have:

users: Ember.computed(function() {
  return this.store.filter('user', {filter: {'is-active': true}}, function(record) {
    return record.get('isActive');
  })
}),

sortLastName: ['lastName:asc', 'firstName:asc'],
usersSorted: Ember.computed.sort('users', 'sortLastName'),

And I print out:

{{#each usersSorted as |user|}}
  {{user.lastName}}, {{user.firstName}}
{{/each}}

If I add a new user, the users list will update, but the usersSorted list will not.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions