-
Notifications
You must be signed in to change notification settings - Fork 27.4k
FilterFilter nested expression support renders strict option useless #7323
Comments
Would it work as you expect with a simple POJO predicate (not nested) like this one below, assuming
I don't think this would work as you expect, either. This is because (I think) nested objects are not the ones to blame here. The strict comparator compares the whole Should this continue this way? Should this logic be changed for a more intuitive approach? I say you better write your own comparator for the moment. |
Hey @albertboada , I agree with you that the bottom of the problem is not the nested objects. Apparently, I have different interpretation of what the BTW, So I went back to the doc https://docs.angularjs.org/api/ng/filter/filter. the
And the
While I understand From the source code I can see that when
If my understanding is correct, the existence of this bug is because the nested predicate support is done in the comparator instead of predicate. I indeed wrote my own filter to handle this. However, IMHO, the code to handle nested predicate should be in the predicate not comparator. |
Not sure why I'm coming back to this, but, some months later, I absolutely agree the |
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Previously, trying to use a deep expression object (i.e. an object whose properties can be objects themselves) did not work correctly. This commit refactors `filterFilter`, making it simpler and adding support for filtering collections of arbitrarily deep objects. Closes angular#7323 Closes angular#9698
Since https://github.com/angular/angular.js/pull/6215/files#r9626594, passing true to strict in the filterFilter is no longer working when nested predicate object is used to filter nested properties of an object.
is working
is not.
The text was updated successfully, but these errors were encountered: