(fix) Partial fix for md-contact-chips

Those fixes resolve the JavaScript errors, but the behavior is wrong;
the displayed results are delayed with respect to the search string.
md-contact-chips is expected to change (for the best) soon.
This commit is contained in:
Francis Lachapelle
2015-05-07 15:15:20 -04:00
parent ab38134ba9
commit 9f9cd68997
5 changed files with 28 additions and 14 deletions
@@ -16,6 +16,7 @@
$scope.allUrlTypes = Card.$URL_TYPES;
$scope.allAddressTypes = Card.$ADDRESS_TYPES;
$scope.categories = {};
$scope.userFilterResults = [];
$scope.addOrgUnit = function() {
var i = $scope.card.$addOrgUnit('');
@@ -41,6 +42,12 @@
var i = $scope.card.$addMember('');
focus('ref_' + i);
};
$scope.userFilter = function($query) {
$scope.currentFolder.$filter($query, {dry: true, excludeLists: true}).then(function(results) {
$scope.userFilterResults = results;
});
return $scope.userFilterResults;
};
$scope.save = function(form) {
if (form.$valid) {
$scope.card.$save()