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

ng-repeat fired on mouse enter event #532

Closed
gaui opened this issue Dec 18, 2014 · 4 comments
Closed

ng-repeat fired on mouse enter event #532

gaui opened this issue Dec 18, 2014 · 4 comments

Comments

@gaui
Copy link

gaui commented Dec 18, 2014

Every time when I hover over some item in the dropdown, it always fires the ng-repeat filter ($digest).
This is lagging my application because I'm working with a large dataset in the ng-repeat.

http://stackoverflow.com/questions/27234374/ng-repeat-continuously-fired-on-hover/27276849

http://i.imgur.com/cStlXzy.gif

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

@OscarGalindo
Copy link

+10

@pitieu
Copy link

pitieu commented Apr 22, 2015

I'm not sure if activeIndex is required in some other functionnality. This might break some other code let me know if this fix?

to fix that i comment the line
.attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')')

and changed css to
.ui-select-bootstrap .ui-select-choices-row.active>a {
color: inherit;
text-decoration: none;
outline: 0;
background-color: transparent;
}
.ui-select-bootstrap .ui-select-choices-row>a:hover, .ui-select-bootstrap .ui-select-choices-row>a:focus {
text-decoration: none;
color: #fff;
background-color: #428BCA;
}

Since it's pure css no digest is called and no more filter called.

@gaui
Copy link
Author

gaui commented Jun 12, 2015

@pitieu Thanks, could you make a PR so it can be merged in?

I tested 0.12.0 and this still is a problem. Shame, because this library would be a replacement of chosen.

@dimirc
Copy link
Contributor

dimirc commented Sep 28, 2015

Should be solved with #1211

@dimirc dimirc closed this as completed Sep 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants