Skip to content

Commit 1714cc8

Browse files
author
Alexandru Mahu
committed
Fixed angular-ui#57 - now select2 initializes also for optgroup
1 parent dad4e19 commit 1714cc8

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)