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

ng-repeat with filter and track by $index and "::" not working  #15175

@squadwuschel

Description

@squadwuschel

Bug Report for

ng-repeat with filter and track by $index and "::" not working right.

What is the current behavior?

I want to filter a list of Items and I don't want a watcher on every list entry so I use "::" for my list Entries like:

 <label>Search: <input ng-model="searchText"></label>
 <tr ng-repeat="friend in friends | filter:searchText track by $index">
    <td>{{::friend.name}}</td>
    <td>{{::friend.phone}}</td>
  </tr>

that works fine until I start filtering, then the result is not what it should be.

filter

If you use the following plunker created from the AngularJs Website demo and just added the above track by $index and "::" to the first List and when you there search for "Mike" you will see the result shown above in the Screenshot.

https://plnkr.co/edit/xMgazcv4ACl5GhpNNdTn?p=preview

What is the expected behavior?

The Filter Should work right even on "::" assigned List Entries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions