Skip to content

Commit

Permalink
Merge pull request #129 from IgniteUI/add-isEmpty-directive
Browse files Browse the repository at this point in the history
add isEmpty directive to combo model
  • Loading branch information
mpavlinov authored Jul 1, 2019
2 parents ec0c0bd + abab609 commit 7ef9950
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/igniteui-angularjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@
});
model.$formatters.push(setControlValue);
model.$parsers.push(parseValue);
model.$isEmpty = function (value) {
var isEmpty = !value || (Array.isArray(value) && value.length == 0);
return isEmpty;
};

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

0 comments on commit 7ef9950

Please # to comment.