HeroicEric / ember-group-by

An Ember addon that adds a computed property macro for grouping objects by a given property.
MIT License
53 stars 17 forks source link

Allow passing in additional keys for recomputing #9

Closed drapergeek closed 8 years ago

drapergeek commented 8 years ago

I ran into an issue where the cache was not busting when I changed a value that was not the grouping value. This solves the issue I was running into and may be helpful for others.

I apologize for the lack of tests but I couldn't figure out a way to properly unit test this functionality.

drapergeek commented 8 years ago

@HeroicEric Would you mind looking over this?

HeroicEric commented 8 years ago

@drapergeek thanks for the PR :) I'm not sure sure I understand the problem that this is solving. Can you provide an example?

Either way, I'd like to have tests before introducing any new features. Maybe we can pair on it?

drapergeek commented 8 years ago

The computed property will not reset unless the actual group by property is changed.

For example, in your test data, if you added another attribute of "year", if you change the year, it won't come out on the other side because the property is not being watched for changes.