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

Commit c8d47cc

Browse files
committed
Merge pull request #1523 from user378230/refactor-ui-choices
refactor(uiSelectChoices) remove old setActiveItem refs
2 parents 7f30bcd + 0b16d14 commit c8d47cc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/uiSelectChoicesDirective.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,14 @@ uis.directive('uiSelectChoices',
4747
choices.attr('ng-repeat', $select.parserResult.repeatExpression(groupByExp))
4848
.attr('ng-if', '$select.open'); //Prevent unnecessary watches when dropdown is closed
4949
if ($window.document.addEventListener) { //crude way to exclude IE8, specifically, which also cannot capture events
50-
choices.attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')')
51-
.attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',$select.skipFocusser,$event)');
50+
choices.attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',$select.skipFocusser,$event)');
5251
}
5352

5453
var rowsInner = element.querySelectorAll('.ui-select-choices-row-inner');
5554
if (rowsInner.length !== 1) throw uiSelectMinErr('rows', "Expected 1 .ui-select-choices-row-inner but got '{0}'.", rowsInner.length);
5655
rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat
5756
if (!$window.document.addEventListener) { //crude way to target IE8, specifically, which also cannot capture events - so event bindings must be here
58-
rowsInner.attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')')
59-
.attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',$select.skipFocusser,$event)');
57+
rowsInner.attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',$select.skipFocusser,$event)');
6058
}
6159

6260
$compile(element, transcludeFn)(scope); //Passing current transcludeFn to be able to append elements correctly from uisTranscludeAppend

0 commit comments

Comments
 (0)