Missing Dependent Keys
See original GitHub issueFirst of all, I just wanted to say well done with this addon!
I have been playing around with this repo that last couple of days and found that there are a good amount of macros that do not have the correct dependents specified. Im not really sure if this has to do directly with ember-macro-helpers or just how this repo is parsing everything.
Object: getBy
myObj: { foo: 'bar' },
someProp: 'foo',
getBy('myObj', 'someProp')
This only adds myObj
and someProp
as the dependents but it should actually be myObj.someProp
.
Array Macros
All (at least the ones I’ve used) of the array macros do not include the necessary dependents to recompute.
filterBy, mapBy, isAny, isEvery, etc do not include array.@each.key
and the rest do not include array.[]
. They only seem to include array
and key
if present but that is not correct.
To get around that, you have to create intermediate properties which I think can be easily avoided if the necessary dependent keys are added.
Environment
Ember-CLI: 2.12 Ember: 2.12 Ember-Awesome-Macros: 0.36.0 Ember-Macro-Helpers: 0.14.1
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
Yea a macro that uses
createClassComputed
inside another computed had an issue that I fixed a few minutes ago in #337. If you change that twiddle to:It should work.
@kellyselden feel free to close this issue once
getBy
has been fixed 😄Thanks again for all the hard work!