Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on select last element #2

Open
lboullo0 opened this issue Nov 1, 2012 · 4 comments
Open

Error on select last element #2

lboullo0 opened this issue Nov 1, 2012 · 4 comments

Comments

@lboullo0
Copy link

lboullo0 commented Nov 1, 2012

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
Copy link

ajeliuc commented Jan 17, 2013

The same thing for me.

@ajeliuc
Copy link

ajeliuc commented Jan 17, 2013

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
Copy link

Sasha011 commented Apr 1, 2014

@ajeliuc Thanks, it works for me as well!

@lakshmandev
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants