This repository was archived by the owner on Oct 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 910910 //Set reference to ngModel from uiSelectCtrl
911911 $select . ngModel = ngModel ;
912912
913+ $select . choiceGrouped = function ( group ) {
914+ return $select . isGrouped && group && group . name ;
915+ } ;
916+
913917 //Idea from: https://github.com/ivaynberg/select2/blob/79b5bf6db918d7560bdd959109b7bcfb47edaf43/select2.js#L1954
914918 var focusser = angular . element ( "<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' aria-haspopup='true' role='button' />" ) ;
915919
Original file line number Diff line number Diff line change 11< ul class ="ui-select-choices ui-select-choices-content select2-results ">
2- < li class ="ui-select-choices-group " ng-class ="{'select2-result-with-children': $select.isGrouped } ">
3- < div ng-show ="$select.isGrouped " class ="ui-select-choices-group-label select2-result-label " ng-bind-html ="$group.name "> </ div >
4- < ul ng-class ="{'select2-result-sub': $select.isGrouped , 'select2-result-single': !$select.isGrouped } ">
2+ < li class ="ui-select-choices-group " ng-class ="{'select2-result-with-children': $select.choiceGrouped($group) } ">
3+ < div ng-show ="$select.choiceGrouped($group) " class ="ui-select-choices-group-label select2-result-label " ng-bind-html ="$group.name "> </ div >
4+ < ul ng-class ="{'select2-result-sub': $select.choiceGrouped($group) , 'select2-result-single': !$select.choiceGrouped($group) } ">
55 < li class ="ui-select-choices-row " ng-class ="{'select2-highlighted': $select.isActive(this), 'select2-disabled': $select.isDisabled(this)} ">
66 < div class ="select2-result-label ui-select-choices-row-inner "> </ div >
77 </ li >
You can’t perform that action at this time.
0 commit comments