Skip to content
This repository has been archived by the owner on Sep 8, 2020. It is now read-only.

Commit

Permalink
Merge pull request #112 from alexmahu/OptgroupInit
Browse files Browse the repository at this point in the history
Fixed #57 - now select2 initializes also for optgroup
  • Loading branch information
ProLoser committed Jan 28, 2014
2 parents 9197cf5 + 1714cc8 commit ea8fc31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/select2.js
Expand Up @@ -22,7 +22,7 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec

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

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

0 comments on commit ea8fc31

Please sign in to comment.