ui-select icon indicating copy to clipboard operation
ui-select copied to clipboard

ng-repeat fired on mouse enter event

Open gaui opened this issue 11 years ago • 4 comments

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

gaui avatar Dec 18 '14 20:12 gaui

+10

OscarGalindo avatar Feb 26 '15 12:02 OscarGalindo

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.

pitieu avatar Apr 22 '15 04:04 pitieu

@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.

gaui avatar Jun 12 '15 22:06 gaui

Should be solved with https://github.com/angular-ui/ui-select/pull/1211

dimirc avatar Sep 28 '15 03:09 dimirc