filterBy needs .@each when composed to see updates
See original GitHub issueIt seems that without a .@each.<keytofilterby>
the result will not update on changes to the key.
I have a reproduction of the bug here: https://ember-twiddle.com/d6a67b62d1a193fbbdaa67fbd5092d14?openFiles=controllers.application.js%2C
I don’t really know how to work with ember-macro-test-helpers so can’t really build a failing test case. But hopefully this twiddle be enough.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Filter by condition in Google Sheets and work with filter views
Click on it, and you'll see the list of all conditions available to filter in Google Sheets. If none of the existing conditions...
Read more >Sort & filter your data - Computer - Google Docs Editors Help
Create a filter. To see filter options, go to the top of the range and click Filter Filter . Filter by condition: Choose...
Read more >Using Advanced Filters in Excel 2010 - Microsoft Support
Go back to the Sort & Filter under the Data tab and click Clear, the database will return to its original view.See image....
Read more >How to Filter Google Sheets Without Affecting Other Users
But applying these filters changes what others see in... ... You don't even need to activate Filter to use a filter views.
Read more >Filtering | JSON:API module | Drupal Wiki guide on Drupal.org
Filtering with arrays: Get nodes created by users [admin, john]. ... It's also rare that you'll need to filter by the same field...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ve discovered that my issue is a separate bug: array macros fail with Array-like objects such as
DS.ManyArray
.I’ve reported it in #423, covered with a failing test in 1e55173 and proposed a fix in #424.
When I do
filterBy("reviewers", "voted", true)
withember-awesome-macros
, then the raw value of$E.voters._dependentKeys[0]
is `“reviewers.@each.voted”.But when I do
voters: filterBy("reviewers", raw("voted"), true)
withember-awesome-macros
, then the raw value of$E.voters._dependentKeys[0]
is `“reviewers”.I even tried
voters: filterBy("reviewers.@each.voted", raw("voted"), true)
and it still didn’t work.I tried the
ember-macro-helpers#composing-class-computed
branch from https://github.com/kellyselden/ember-macro-helpers/pull/149 and it did not help.I’ve been slowly converting my app to
ember-awesome-macros
(because I’m a huge fan), but this bug burns badly. I wonder how many regressions my app has already?@kellyselden, which other macros may be affected by this?
Will you accept a PR that adds checks for
.@each.
inside_dependentKeys[0]
to tests of every array macro?