Skip to content

Commit ea8fc31

Browse files
committed
Merge pull request angular-ui#112 from alexmahu/OptgroupInit
Fixed angular-ui#57 - now select2 initializes also for optgroup
2 parents 9197cf5 + 1714cc8 commit ea8fc31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/select2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
2222

2323
// Enable watching of the options dataset if in use
2424
if (tElm.is('select')) {
25-
repeatOption = tElm.find('option[ng-repeat], option[data-ng-repeat]');
25+
repeatOption = tElm.find( 'optgroup[ng-repeat], optgroup[data-ng-repeat], option[ng-repeat], option[data-ng-repeat]');
2626

2727
if (repeatOption.length) {
2828
repeatAttr = repeatOption.attr('ng-repeat') || repeatOption.attr('data-ng-repeat');

0 commit comments

Comments
 (0)