U4-11526 - Member Group Picker doesn't remove group after unselecting it during selection. (#2835)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
d224a93ce1
commit
7d439566cd
@@ -24,7 +24,16 @@ angular.module("umbraco").controller("Umbraco.Overlays.MemberGroupPickerControll
|
||||
}
|
||||
|
||||
function selectMemberGroups(id) {
|
||||
$scope.model.selectedMemberGroups.push(id);
|
||||
var index = $scope.model.selectedMemberGroups.indexOf(id);
|
||||
|
||||
if(index === -1){
|
||||
// If the id does not exists in the array then add it
|
||||
$scope.model.selectedMemberGroups.push(id);
|
||||
}
|
||||
else{
|
||||
// Otherwise we will remove it from the array instead
|
||||
$scope.model.selectedMemberGroups.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/** Method used for selecting a node */
|
||||
|
||||
Reference in New Issue
Block a user