Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Selecting another value #454

Open
eugenevk opened this issue Jan 12, 2018 · 1 comment
Open

Selecting another value #454

eugenevk opened this issue Jan 12, 2018 · 1 comment

Comments

@eugenevk
Copy link

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.

@zatchgordon
Copy link

zatchgordon commented Apr 27, 2018

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]] } };

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants