Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

ng-repeat fired on hover #460

Closed
gaui opened this issue Dec 1, 2014 · 2 comments
Closed

ng-repeat fired on hover #460

gaui opened this issue Dec 1, 2014 · 2 comments

Comments

@gaui
Copy link

gaui commented Dec 1, 2014

Is this normal behavior? Can this be avoided?

https://s3.amazonaws.com/uploads.hipchat.com/136601/989834/HHK0VvyS3TIArW4/select2-loop.gif

Plunker:
http://plnkr.co/edit/CvHxWZzv6V7XK368cZF3?p=preview

@gaui gaui closed this as completed Dec 2, 2014
@gaui
Copy link
Author

gaui commented Dec 2, 2014

An expert says because the DOM element changes (ng-mouseenter triggering hover) for elements from the countries dropdown, the watchcollection is fired for the whole countries array so the ng-repeat above is always fired (thus the filter with the console.log). This can be fixed with track by country.code

@dimirc
Copy link
Contributor

dimirc commented Sep 28, 2015

Related to #1211

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants