zestia / ember-select-box

:capital_abcd: A faux select box for Ember apps
MIT License
64 stars 14 forks source link

Add default multiple selection behaviour for faux select #15

Closed amk221 closed 6 years ago

amk221 commented 6 years ago

When selecting an option in a faux-select which has multiple=true

The behaviour was undefined, and the select box just sent out ["the option"] an array with the option that was selected, just then.

Originally, the thinking behind this was that ember-select-box could not know what you wanted to happen. So left it up to you. But really, the majority of cases all want the same thing, and that is to add the option that was just selected to the selection.

Now, the default will be to add that option to the list of selected values if it's not already in there, and remove it if it is.