bentorfs / angular-bootstrap-multiselect

Native angularJS custom form element
http://bentorfs.github.io/angular-bootstrap-multiselect/
MIT License
79 stars 111 forks source link

Instead of blocking further selection unselect previoulsy selected item #57

Open AntonFetzer opened 7 years ago

AntonFetzer commented 7 years ago

In my new website, I make extensive use of this very useful multi select script. But I have several selectors, where you can only have one selected option at a time. When I deployed my new website, the feedback I got most often was, that it is inconvenient to have to manually unselect the previously selected item, in order change the selection to another one. Would it be possible to have an option for this case, where the previously selected item is simply replaced by the newly selected item? But anyway, thanks for providing this very useful feature set!

bentorfs commented 7 years ago

It sounds like you want a regular suggestion box, rather than this one which is specifically for multiple items.

I'm not working on this any more, but feel free to make a PR!

On Fri, Sep 15, 2017 at 3:03 PM AntonFetzer notifications@github.com wrote:

In my new website, I make extensive use of this very useful multi select script. But I have several selectors, where you can only have one selected option at a time. When I deployed my new website, the feedback I got most often was, that it is inconvenient to have to manually unselect the previously selected item, in order change the selection to another one. Would it be possible to have an option for this case, where the previously selected item is simply replaced by the newly selected item? But anyway, thanks for providing this very useful feature set!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/bentorfs/angular-bootstrap-multiselect/issues/57, or mute the thread https://github.com/notifications/unsubscribe-auth/AGFQ_LgsDi-H2NYciDC1GvnCXCtNPL7sks5sinWtgaJpZM4PY8N5 .

AntonFetzer commented 7 years ago

No, I do not want a suggestion box. I really like the design of your drop-down menus, but sometimes it does not make sense to have more than one selected object at a time. I and several of my users would appreciate it, if clicking on another object in the dropdown would automatically unselect the previously selected item and select the clicked item. It would make the workflow even smoother, if the drop-down would open automatically, if you just point the mouse on it without having to click every time to do that.

AntonFetzer commented 7 years ago

Also, what is a PR ?

bentorfs commented 7 years ago

a Pull Request. You can write the code for this feature yourself and contribute it. I understand your need, but I have no time to do it myself.

On Mon, Sep 18, 2017 at 2:38 PM AntonFetzer notifications@github.com wrote:

Also, what is a PR ?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bentorfs/angular-bootstrap-multiselect/issues/57#issuecomment-330206545, or mute the thread https://github.com/notifications/unsubscribe-auth/AGFQ_Jvayzyxdgq_dGDhAr_BrnjwL9IHks5sjmQqgaJpZM4PY8N5 .

AntonFetzer commented 7 years ago

Ok, I managed to modify your code, but I still do not understand how Git works. So this is the code, which contains the features I described above:

dropdown.zip