diff --git a/src/app/component/angularjs-dropdown-multiselect.controller.js b/src/app/component/angularjs-dropdown-multiselect.controller.js index e837cc99..f0da072d 100644 --- a/src/app/component/angularjs-dropdown-multiselect.controller.js +++ b/src/app/component/angularjs-dropdown-multiselect.controller.js @@ -199,8 +199,10 @@ export default function dropdownMultiselectController( $scope.externalEvents.onClose(); } - function selectCurrentGroup(currentGroup) { - $scope.selectedModel.splice(0, $scope.selectedModel.length); + function selectCurrentGroup(currentGroup, singleGroupSelection = true) { + if (singleGroupSelection) { + $scope.selectedModel.splice(0, $scope.selectedModel.length); + } $scope.options.forEach((item) => { if (item[$scope.settings.groupBy] === currentGroup) { $scope.setSelectedItem(item, false, false); diff --git a/src/app/component/angularjs-dropdown-multiselect.html b/src/app/component/angularjs-dropdown-multiselect.html index e92650b6..b4d294df 100644 --- a/src/app/component/angularjs-dropdown-multiselect.html +++ b/src/app/component/angularjs-dropdown-multiselect.html @@ -75,7 +75,8 @@