Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

[BUG] ng-repeat filter true #14601

Closed
exejutable opened this issue May 12, 2016 · 1 comment
Closed

[BUG] ng-repeat filter true #14601

exejutable opened this issue May 12, 2016 · 1 comment

Comments

@exejutable
Copy link

exejutable commented May 12, 2016

What is the current behavior?

On ng-repeat filter: model : true (strict) If i do a filter in the array and then cleaned the input, it does not return to normal state (not filtered)

Angular version
1.4.9

Link to reproduce the bug

http://plnkr.co/edit/my0ilXPu7aTUIiKxOI4n?p=preview

Steps

  • Filter in the input (the array filter correctly)
  • Clean the input (the array does not return to the previus state (not filtered)

What is the expected behavior?

I suppose the expected behavior is return the ng-repeat array complete (not filtered).

@gkalpak
Copy link
Member

gkalpak commented May 13, 2016

This is expected behavior. It happens because initially the expression is undefined, but when you clear the field it is an empty string (and undefined !== '').
See #12060 for more context and possible work-arounds.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants