Skip to content

Commit abab609

Browse files
committed
add isEmpty directive to combo model
1 parent ec0c0bd commit abab609

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/igniteui-angularjs.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@
207207
});
208208
model.$formatters.push(setControlValue);
209209
model.$parsers.push(parseValue);
210+
model.$isEmpty = function (value) {
211+
var isEmpty = !value || (Array.isArray(value) && value.length == 0);
212+
return isEmpty;
213+
};
210214

211215
unbinder = scope.$watch(attrs.source, function (newValue) {
212216
var items = [], newDataSource = [], combo = element.data(controlName);

0 commit comments

Comments
 (0)