-
Notifications
You must be signed in to change notification settings - Fork 27.4k
filterFilter doesn't work with Array like objects anymore #11782
Comments
@gkalpak can you take a look at this one? |
Throw error if filter is not used with an array like object. Closes angular#11782
Will do. |
Throw error if filter is not used with an array like object. Closes angular#11782
A little background:
That said, I don't see why we couldn't support array-like objects (in the internal Angular sense). It seems to be a trivial change. @gonzaloruizdevilla has already submitted a PR (#11787) we can work on, so let's move the discussion there. |
One can ducktype an array for one's own purposes without it being a proper subclass and still like Angular to treat it like a collection in some cases. |
https://jsfiddle.net/0L11e3xf/ here's a proper version of the 1.3 repro posted above which works correctly, by subclassing the array "properly" --- but yes, filterFilter should replace |
@caitp, still not sure what you suggest :) This doesn't work as is (because of the Are you saying something different ? Regarding the |
I had to re-word that whole slew of things to sound less negative, that's all |
@gkalpak I don't think the It's funny to see how today's implementation is so similar to the one I PR those days. @IgorMinar had to make a difficult implementation due to IE8 support in those versions (ec54712) |
Throw error if filter is not used with an array like object. Closes angular#11782
Throw error if filter is not used with an array like object. Closes angular#11782
Throw error if filter is not used with an array like object. Closes angular#11782
Throw error if filter is not used with an array like object. Closes angular#11782 Closes angular#11787
filterFilter also doesn't work with Array like objects anymore, like it used to before.
Please take a look at this fiddle:
Works like it should with previous version of Angular (v1.2):
https://jsfiddle.net/superasn/gznzjgmb/
Breaks with newer versions of Angular (v1.3 and above):
https://jsfiddle.net/superasn/c15yvq6g/
The text was updated successfully, but these errors were encountered: