Skip to content

Commit f75a7af

Browse files
committed
Merge pull request angular-ui#143 from kbanman/fix-init
Fix initSelection for pre-defined values
2 parents 42712d2 + e25da56 commit f75a7af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/select2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
200200
elm.select2(opts);
201201

202202
// Set initial value - I'm not sure about this but it seems to need to be there
203-
elm.val(controller.$viewValue);
203+
elm.select2('val', controller.$viewValue);
204204
// important!
205205
controller.$render();
206206

0 commit comments

Comments
 (0)