Have cor-checkable-menus reflect the filtered set of items
Fixes https://jira.coreos.com/browse/QUAY-837
This commit is contained in:
parent
6220df4f88
commit
e857c676db
4 changed files with 21 additions and 9 deletions
|
@ -359,7 +359,8 @@ angular.module("core-ui", [])
|
|||
transclude: true,
|
||||
restrict: 'C',
|
||||
scope: {
|
||||
'controller': '=controller'
|
||||
'controller': '=controller',
|
||||
'filter': '=?filter'
|
||||
},
|
||||
controller: function($rootScope, $scope, $element) {
|
||||
$scope.getClass = function(items, checked) {
|
||||
|
@ -381,7 +382,7 @@ angular.module("core-ui", [])
|
|||
$scope.toggleItems = function($event) {
|
||||
$event.stopPropagation();
|
||||
if ($scope.controller) {
|
||||
$scope.controller.toggleItems();
|
||||
$scope.controller.toggleItems($scope.filter);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -389,7 +390,7 @@ angular.module("core-ui", [])
|
|||
if ($scope.controller) {
|
||||
$scope.controller.checkByFilter(function(item) {
|
||||
return filter({'item': item});
|
||||
});
|
||||
}, $scope.filter);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue