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

noneSelectedText not working in v.1.13.0 #2071

Closed
ghost opened this issue Aug 26, 2018 · 3 comments
Closed

noneSelectedText not working in v.1.13.0 #2071

ghost opened this issue Aug 26, 2018 · 3 comments

Comments

@ghost
Copy link

ghost commented Aug 26, 2018

@Emovere commented on Apr 21, 2018, 2:06 PM UTC:

Bug:
The noneSelectedText isnt showing up at all.
It has worked in v.1.12.4.

How to reproduce the bug:
HTML:
<select class="btn-group form-control selectpicker m-0" data-show-subtext="true" data-selected-text-format="count" data-live-search="true" multiple="multiple"> <option value="" data-subtext="123" data-tokens="123"> 123 </option> <option value="" data-subtext="123" data-tokens="123"> 123 </option> <option value="" data-subtext="123" data-tokens="123"> 123 </option> <option value="" data-subtext="123" data-tokens="123"> 123 </option> </select>
JS:
$('.selectpicker').selectpicker({ size: 8.4, noneSelectedText: '<span class="placeholder">Choose multiple</span>', });

1.12.4 output is like this:
<button type="button" ... title="Choose multiple" ...><span class="filter-option pull-left"><span class="placeholder">Choose multiple</span></span>&nbsp;<span class="bs-caret"><span class="caret"></span></span></button>

1.13.0 output is like this:
<button type="button" ... title ...><div class="filter-option"><div class="filter-option-inner"><div class="filter-option-inner-inner"></div></div> </div><span class="bs-caret"><span class="caret"></span></span></button>

So "Choose multiple" doesnt get set, nor in the title or the element itself inside the button.
Does somebody know how to fix this?

This issue was moved by caseyjhol from snapappointments/bootstrap-select-temp#48.

@ghost
Copy link
Author

ghost commented Aug 26, 2018

@Emovere commented on Apr 23, 2018, 12:43 PM UTC:

Am I right that the 'title' option behaves exactly the same as 'noneSelectedText'?
In all examples I could think of, I can replace noneSelectedText with Title in case of a 'multiple' selectpicker.

So maybe you dont have to correct this bug, but instead remove the 'noneSelectedText' option.

@ghost
Copy link
Author

ghost commented Aug 26, 2018

@caseyjhol commented on Apr 23, 2018, 6:28 PM UTC:

noneSelectedText is the default text used if there aren't any selected options. You are right that the title attribute always overrides noneSelectedText. In a future major release, I'd like to add a new option - "placeholder" - that would be used to set the default text instead of title, and title would then revert to its normal usage (so a static title could be set and would not be overwritten when options are selected).

@ghost
Copy link
Author

ghost commented Aug 26, 2018

@caseyjhol commented on Apr 23, 2018, 6:38 PM UTC:

Fixed and released in v1.13.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