indrimuska / angular-selector

A native AngularJS directive that transform a simple <select> box into a full html select with typeahead.
http://indrimuska.github.io/angular-selector
MIT License
96 stars 36 forks source link

Automatically close the list of options after choosing the item in multiple mode. #31

Closed C00per closed 8 years ago

C00per commented 8 years ago

Hi, Is it possible to have the option to close the list of items by choosing the item in the "multiple" mode?

indrimuska commented 8 years ago

Hi @C00per, you can use the api property to close the selector every time the model changes (using the native $watch method). Have you already tried it?

C00per commented 8 years ago

@indrimuska, I'll give it a try. However, It seems that using the api property is the too complicated solution.

indrimuska commented 8 years ago

It's not so hard to implement, check out this plunker: http://plnkr.co/edit/RsvH9LkSfwjq60sbMepR?p=preview

C00per commented 8 years ago

Great! Thank you!

indrimuska commented 8 years ago

You're welcome! :)

indrimuska commented 8 years ago

@C00per you can now use closeAfterSelection property. Check out #45.