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
title attribute is not working when you don't use multiple #738
Comments
Totally agree. |
If you want a placeholder option just add
as the first option and bootstrap-select will auto select that as the placeholder when nothing is selected. |
@truckingsim That won't work if you also made that selection |
+1 |
This I think is better, because otherwise your select will have by default the value of the hidden options' text. Still a hackish way though, it makes no sense to have an empty option as a label, when one could ideally use a title="" attribute just as with the multiple selects... |
@hellocosmin I guess I'm not sure what the fix is here? A regular select has to have at least one option selected at all times. I suppose setting the title attribute could just automatically insert <option data-hidden="true" value="">Choose one...</option> |
@caseyjhol Tested against 0351bd8 and still having to use the hidden option hack manually... setting the |
Hrmm...it's working for me (Chrome 42, Windows 8.1). Can you provide me with a jsfiddle? The option's text node is empty on purpose. |
Also fixes an issue when actionsBox is set on a non-multiple select. Fixes #1017. Add commentary explaining liObj.
@nickbouton Give it a shot now using the latest version from master. I was able to reproduce it if the select had a lot of options, but it was working fine on a select with ~20 options. |
@caseyjhol Scratch my previous comment, I dumped a cut-down version of what I had into JSfiddle and it looks to be working fine. Might be another library version causing issues or conflicting with something, I'll try and track it down here. Thanks for your help. |
I experienced this problem as well. I attempted to update the bootstrap-select code to apply this fix. However, this significantly changed the styling inside our application. I fixed the problem by applying the above fix |
A blank option is prepended to the select, which is then selected by default. This allows the title to be shown when the select is initially loaded and "no" options are selected yet. Close snapappointments#888. Close snapappointments#738.
Also fixes an issue when actionsBox is set on a non-multiple select. Fixes snapappointments#1017. Add commentary explaining liObj.
It would be very useful if we can use the title attribute also with a default select picker, like:
<select class="selectpicker" title='Choose one of the following...'>
For now its only working when you specify multiple.
The text was updated successfully, but these errors were encountered: