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

Commit e25153c

Browse files
author
Austin McDaniel
committed
Adding ability to have a callback for highlighting an item
1 parent b044b41 commit e25153c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/select.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,9 @@
301301

302302
ctrl.setActiveItem = function(item) {
303303
ctrl.activeIndex = ctrl.items.indexOf(item);
304+
ctrl.onHighlightCallback($scope, {
305+
$item: item
306+
});
304307
};
305308

306309
ctrl.isActive = function(itemScope) {
@@ -605,6 +608,7 @@
605608

606609
$select.onSelectCallback = $parse(attrs.onSelect);
607610
$select.onRemoveCallback = $parse(attrs.onRemove);
611+
$select.onHighlightCallback = $parse(attrs.onHighlight);
608612

609613
//From view --> model
610614
ngModel.$parsers.unshift(function (inputValue) {

0 commit comments

Comments
 (0)