Fixed bug associating hosts

This commit is contained in:
Michael Abashian 2017-07-03 16:19:01 -04:00
parent 6c006690d3
commit 18fe4945bc

View File

@ -70,14 +70,14 @@
let item = value.value;
if (value.isSelected) {
$scope.selectedItems.push(item.id);
$scope.selectedItems.push(item);
}
else {
// _.remove() Returns the new array of removed elements.
// This will pull all the values out of the array that don't
// match the deselected item effectively removing it
$scope.selectedItems = _.remove($scope.selectedItems, function(selectedItem) {
return selectedItem !== item.id;
return selectedItem.id !== item.id;
});
}
});