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

selectAll and deselectAll can be called on standard select boxes #1373

Closed
chrisnovakovic opened this issue Apr 28, 2016 · 0 comments
Closed

Comments

@chrisnovakovic
Copy link

Calling .selectpicker('selectAll') and .selectpicker('deselectAll') on standard (i.e., not multiple) select boxes works, with some consequences that might appear odd to the caller:

  • selectAll causes every item in the bootstrap-select box to be highlighted. val() (for both the bootstrap-select and underlying <select>) and the selected item in the bootstrap-select are both the final list item.
  • deselectAll doesn't change the highlighting of any items in the bootstrap-select box. val() (for both the bootstrap-select and underlying <select>) is the empty string, and the selected item in the bootstrap-select correctly reverts to the placeholder if there is one.

It doesn't make sense to allow either of these methods to be called on a non-multiple select box, especially given the documentation's implication that they should only be called on multiple select boxes.

avantika-gupta-jtg pushed a commit to JoshLabs/bootstrap-select that referenced this issue May 14, 2020
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