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

Non-unique value causing multiple selection #52

Open
patrickgalbraith opened this issue Aug 25, 2014 · 1 comment
Open

Non-unique value causing multiple selection #52

patrickgalbraith opened this issue Aug 25, 2014 · 1 comment

Comments

@patrickgalbraith
Copy link
Contributor

If the option value is not unique then it causes multiple options to be selected.

See this fiddle http://jsfiddle.net/a90wqg27/ and try selecting Bicycling, mountain, general and Bicycling, BMX will also be selected.

It is valid to have multiple options with the same value so you might want to add a unique identifier to the option using a data attribute to keep track of each option rather than assuming that the values will be unique.

In this case I could easily work around the issue by using <option data-value="x"> and fixing it with javascript but it would be nice to not have to do that.

@patrickgalbraith
Copy link
Contributor Author

Actually it seems to work fine if live is set to false. So it might have something to do with the live option.

See http://jsfiddle.net/a90wqg27/1/

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

1 participant