angularjs-dropdown-multiselect
angularjs-dropdown-multiselect copied to clipboard
Selecting another value
Hello, I have set selectionLimit to 1. If I have selected a value and then want to select another value, I first have to unselect the value currently chosen. Can this be done automatically by selecting another value from the list? It would prevent the user has to do an additional click.
For anybody who sees this I ended up setting selectionLimit to 2 and then adding the event onMaxSelectionReached where I set whatever model I have to the second selected option.
e.g.
html: (simplified for purpose of example)
<div ng-dropdown-multiselect="" selected-model="vm.coolio" events="vm.multiEvents"></div>
controller:
vm.multiEvents = {onMaxSelectionReached: function(){ vm.coolio = [vm.coolio[1]] } };