EvanOxfeld / angular-selectize.js

Angular Selectize directive for a hybrid textbox + <select> box. Supports ngOptions and two-way bindings.
MIT License
34 stars 16 forks source link

Multiselect defaults to an active option that isn't the first option #11

Closed EvanOxfeld closed 10 years ago

EvanOxfeld commented 10 years ago

If options are placed on scope after the selectize component is initialized, one of the options is set to active, and it isn't the first option. Closing and reopening the dropdown once seems to reset this.

Here's a plunk that demonstrates the problem -- http://plnkr.co/edit/TaAssL

EvanOxfeld commented 10 years ago

The addItem() in scheduleUpdate() can change the active option. Manually setting the active option on the following line may be the way to go.