Skip to content

Commit d6e3fde

Browse files
committed
Merge pull request angular-ui#174 from roend83/master
Set $isEmpty function on model controller for hidden inputs that allow m...
2 parents a196dc3 + 32b4fdf commit d6e3fde

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/select2.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelec
9696
elm.select2('val', controller.$viewValue);
9797
} else {
9898
if (opts.multiple) {
99+
controller.$isEmpty = function (value) {
100+
return !value || value.length === 0;
101+
};
99102
var viewValue = controller.$viewValue;
100103
if (angular.isString(viewValue)) {
101104
viewValue = viewValue.split(',');

0 commit comments

Comments
 (0)