You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
I recently changed my applications angular dependency from 1.2.10 to 1.2.12. And the first thing I observed is that some of the filters I'm using for a data table have stopped functioning. A closer inspection revealed that the filters have stopped working for all those properties which are nested one level.
For example, if the object being rendered for every row is such—
@anirvan-majumdar I think it was fixed in master via b4eed8a but we would need a plunk to confirm. Could you please test on your side with the latest snapshot from master (http://code.angularjs.org/snapshot/) or provide a plunker with the reproduce scenario?
With the new syntax, the filtering works, but initially when the page loads and the nested filter variable is undefined or null, the filter returns 0 results. When you type in the input, the filtering works - also when you clear the input, which sets the variable to empty string. The filtering also works if you initialize the filter variable as emtpy string in the controller.
When you have a non-nested filter an undefined variable returns the whole collection (null is a special case which returns nothing in all cases, I think).
As @Narretz mentioned, this works as expected in the latest versions (1.2.26, 1.3.0).
This should be probably closed.
Regarding the issue brought up by @Narretz (#6222 (comment)), the problem can also be solved by using a search object and binding the inputs to properties of that object:
Activity
pkozlowski-opensource commentedon Feb 13, 2014
@anirvan-majumdar I think it was fixed in master via b4eed8a but we would need a plunk to confirm. Could you please test on your side with the latest snapshot from master (http://code.angularjs.org/snapshot/) or provide a plunker with the reproduce scenario?
anirvan-majumdar commentedon Feb 14, 2014
Here's the plunker that depicts the issue — link
If you change the referenced library from
1.2.12to1.2.10, then everything will work fine with the filters.Narretz commentedon Mar 9, 2014
Here's the plunker with 1.2.14:
http://plnkr.co/edit/uB7Mta?p=preview
With the new syntax, the filtering works, but initially when the page loads and the nested filter variable is undefined or null, the filter returns 0 results. When you type in the input, the filtering works - also when you clear the input, which sets the variable to empty string. The filtering also works if you initialize the filter variable as emtpy string in the controller.
When you have a non-nested filter an undefined variable returns the whole collection (null is a special case which returns nothing in all cases, I think).
gkalpak commentedon Oct 25, 2014
As @Narretz mentioned, this works as expected in the latest versions (1.2.26, 1.3.0).
This should be probably closed.
Regarding the issue brought up by @Narretz (#6222 (comment)), the problem can also be solved by using a
searchobject and binding the inputs to properties of that object:Demo fiddle
lgalfaso commentedon Jan 7, 2015
with #6222 (comment), this can be closed