This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 301
301
302
302
ctrl . setActiveItem = function ( item ) {
303
303
ctrl . activeIndex = ctrl . items . indexOf ( item ) ;
304
- ctrl . onHighlightCallback ( $scope , {
305
- $item : item
306
- } ) ;
307
304
} ;
308
305
309
306
ctrl . isActive = function ( itemScope ) {
310
- return ctrl . open && ctrl . items . indexOf ( itemScope [ ctrl . itemProperty ] ) === ctrl . activeIndex ;
307
+ var isActive = ctrl . open && ctrl . items . indexOf ( itemScope [ ctrl . itemProperty ] ) === ctrl . activeIndex ;
308
+
309
+ if ( isActive && ! angular . isUndefined ( ctrl . onHighlightCallback ) ) {
310
+ itemScope . $eval ( ctrl . onHighlightCallback ) ;
311
+ }
312
+
313
+ return isActive ;
311
314
} ;
312
315
313
316
ctrl . isDisabled = function ( itemScope ) {
608
611
609
612
$select . onSelectCallback = $parse ( attrs . onSelect ) ;
610
613
$select . onRemoveCallback = $parse ( attrs . onRemove ) ;
611
- $select . onHighlightCallback = $parse ( attrs . onHighlight ) ;
612
614
613
615
//From view --> model
614
616
ngModel . $parsers . unshift ( function ( inputValue ) {
876
878
$select . parseRepeatAttr ( attrs . repeat , groupByExp ) ; //Result ready at $select.parserResult
877
879
878
880
$select . disableChoiceExpression = attrs . uiDisableChoice ;
881
+ $select . onHighlightCallback = attrs . onHighlight ;
879
882
880
883
if ( groupByExp ) {
881
884
var groups = element . querySelectorAll ( '.ui-select-choices-group' ) ;
You can’t perform that action at this time.
0 commit comments