mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 15:36:04 -03:30
Merge pull request #6876 from mabashian/6871-associate-host
Fixed bug associating hosts
This commit is contained in:
@@ -70,14 +70,14 @@
|
|||||||
let item = value.value;
|
let item = value.value;
|
||||||
|
|
||||||
if (value.isSelected) {
|
if (value.isSelected) {
|
||||||
$scope.selectedItems.push(item.id);
|
$scope.selectedItems.push(item);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// _.remove() Returns the new array of removed elements.
|
// _.remove() Returns the new array of removed elements.
|
||||||
// This will pull all the values out of the array that don't
|
// This will pull all the values out of the array that don't
|
||||||
// match the deselected item effectively removing it
|
// match the deselected item effectively removing it
|
||||||
$scope.selectedItems = _.remove($scope.selectedItems, function(selectedItem) {
|
$scope.selectedItems = _.remove($scope.selectedItems, function(selectedItem) {
|
||||||
return selectedItem !== item.id;
|
return selectedItem.id !== item.id;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user