Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.16.0] Computed filter regression #15843

Closed
ilucin opened this issue Nov 10, 2017 · 3 comments
Closed

[2.16.0] Computed filter regression #15843

ilucin opened this issue Nov 10, 2017 · 3 comments

Comments

@ilucin
Copy link
Contributor

ilucin commented Nov 10, 2017

There's a regression bug in computed.filter not observing property changes properly -> in 2.16 release.

Paste this into the console:

Obj = Ember.Object.extend({
  filteredItems: Ember.computed.filter('items.@each.{prop}', function(item) {
    return item.get('prop') === false;
  })
});

obj = Obj.create();
obj.set('items', [Ember.Object.create({prop: false})]);
console.log('Expected: 1 Actual: ', obj.get('filteredItems.length'));
obj.get('items')[0].set('prop', true);
console.log('Expected: 0 Actual: ', obj.get('filteredItems.length'));

This is the third core regression bug (#15836, #15733) I found in 2.16 and this one is pretty major. What's happening here, are there any more? Shall I PR failing tests in core_object module? @rwjblue

@rwjblue
Copy link
Member

rwjblue commented Nov 10, 2017

Yes, a failing test PR would be helpful. I'm not sure of the root cause without digging yet...

@ilucin
Copy link
Contributor Author

ilucin commented Nov 10, 2017

Here it is. I've scanned the 2-15.3 -> 2.16.0 changes and I can see that there has been some ember-core updating going on but I can't find the source of these regressions.

@Serabe
Copy link
Member

Serabe commented Nov 30, 2017

Fixed in #15855

@Serabe Serabe closed this as completed Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants