angularjs-dropdown-multiselect icon indicating copy to clipboard operation
angularjs-dropdown-multiselect copied to clipboard

limit selection bug

Open ronbiter opened this issue 7 years ago • 0 comments

in version 2, when selection limited to 1 (single select), i'm changing selection from option to option, an event for item selected is fired, but not for item deselected. i think that when selection is limited to 1 option both events should be fired.

something like this:

else if ($scope.settings.selectionLimit === 1 && !exists && $scope.selectedModel.length === $scope.settings.selectionLimit) { var old = $scope.selectedModel.pop(); $scope.selectedModel.push(option); if (fireSelectionChange) { $scope.externalEvents.onItemDeselect(old); $scope.externalEvents.onItemSelect(option); } if ($scope.settings.closeOnSelect) { $scope.close(); } }

ronbiter avatar Jul 11 '17 06:07 ronbiter