simpulton / angular-chosen

This project shows the integration of AngularJS and the Chosen plugin.
66 stars 25 forks source link

Error on select last element #2

Open lboullo0 opened 12 years ago

lboullo0 commented 12 years ago

When you select the last element of the list Firebug says: TypeError: this.form_field.options[d.options_index] is undefined To reproduce the bug, remove the word multiple in file index.html and select the last element.

ajeliuc commented 11 years ago

The same thing for me.

ajeliuc commented 11 years ago

I resolved this in chosen plugin by including one empty option tag in html like

<select ng-model="company.category" data-placeholder="Choose company category..." chosen ng-options="category.id as category.name for category in categories" class="span6">
    <option value=""></option>
</select>
Sasha011 commented 10 years ago

@ajeliuc Thanks, it works for me as well!

lakshmandev commented 8 years ago

@ajeliuc But I already have an empty <option value=""></option> included in my dynamic select box. But I'm getting the same error. :(