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

Computed filter not recomputing #15920

Closed
evoactivity opened this issue Dec 4, 2017 · 7 comments
Closed

Computed filter not recomputing #15920

evoactivity opened this issue Dec 4, 2017 · 7 comments

Comments

@evoactivity
Copy link

Upgraded my app to 2.16.2 and noticed some of my filtered arrays were no longer filtering when I changed properties of the items in the array.

I have these setup and the computed reruns when I change prop1, but the filter only runs on render.

test: computed('model.@each.{prop1,prop2}', function(){
  console.log('running computed');
  return '';
}),

filterTest: filter('model.@each.{prop1,prop2}', function(item){
  console.log('filtering');

  if (item.get('prop1')) {
    return item;
  }
})

I've created a repository that shows the bug in action https://github.com/evoactivity/ember-broken-filters, here is a twiddle showing the same setup working as expected in 2.12 https://ember-twiddle.com/57d664edc79ac56b3011f2dd2763903b?openFiles=controllers.application.js%2Ctemplates.components.list-item.hbs

@karthiicksiva
Copy link
Contributor

@evoactivity I think, this regression is fixed in #15855

Changes are available in the latest release v2.17.0

@Serabe
Copy link
Member

Serabe commented Dec 22, 2017

@evoactivity can you please check that it is fixed in 2.17? If so, we can try to backport it to 2.16.

@evoactivity
Copy link
Author

@Serabe I'll update my test app tomorrow to have a look

@evoactivity
Copy link
Author

@Serabe sorry, I totally forgot to do this. I should have a bit of time this week to check it out.

@Serabe
Copy link
Member

Serabe commented Jan 11, 2018

@evoactivity ping!

@evoactivity
Copy link
Author

evoactivity commented Jan 11, 2018

@Serabe I'm terrible aren't I! I actually had a few minutes just now so your ping was timed well.

I can confirm updating to 2.17 did resolve the issue.

@Serabe
Copy link
Member

Serabe commented Jan 14, 2018

Thank you!

@Serabe Serabe closed this as completed Jan 14, 2018
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