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

Calling clearOptions then adding new options will use old labels if values are the same #358

Closed
naim opened this issue Mar 31, 2014 · 2 comments
Labels

Comments

@naim
Copy link

naim commented Mar 31, 2014

Create a select with the following options:

[
  {value: "1", text: "red"},
  {value: "2", text: "blue"},
  {value: "3", text: "green"},
  {value: "4", text: "yellow"},
  {value: "5", text: "orange"}
]

Then, later, call clearOptions on that select. Next, using addOption, add the following options and then call refreshOptions:

[
  {value: "1", text: "square"},
  {value: "2", text: "circle"},
  {value: "3", text: "triangle"}
]

Opening the select will show "red", "blue", and "green" instead of "square", "circle", and "triangle". Selecting one of the items from the list will populate the select with "square", "circle", or "triangle" as expected, but the dropdown labels are incorrect.

This was tested using version 0.9.0.

@brianreavis
Copy link
Member

Thanks for pointing this out. Patched up :)

@naim
Copy link
Author

naim commented Apr 30, 2014

Cheers!

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

No branches or pull requests

2 participants