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

Support for Title in single select drop down? #475

Closed
jdenwar opened this issue Feb 12, 2014 · 2 comments
Closed

Support for Title in single select drop down? #475

jdenwar opened this issue Feb 12, 2014 · 2 comments
Milestone

Comments

@jdenwar
Copy link

jdenwar commented Feb 12, 2014

If I have a title attribute in select menu, it doesnot seem to honour it, instead displays the first option as a default value.

Adding data-hidden = true to first option does the job but the indexing seems to be off. The keyboard selection no longer works.

_EXAMPLE_

Without Title

<select class = "selectpicker>
<option>A</option>
<option>B</option>
<option>C<./option>
</select>

Keyboard navigation works fine here: Selecting A will choose A and so on:

_----------------------------------------------------------------------------------------------------------------------_
With Title

<select class = "selectpicker>
<option data-hidden = "true">Character</option>
<option>A</option>
<option>B</option>
<option>C<./option>
</select>

If you type A on this drop down, it selects B, if you type B on this drop down, it selects C and so on.

_----------------------------------------------------------------------------------------------------------------------_

Re-rendering or refreshing doesnot seem to work. Any clues?

@truckingsim
Copy link
Contributor

Ok so @jdenwar good find I've been looking for this problem for a while and you just gave me the answer to fix it. Github added my fix to my other pull request so here's the compare:

https://github.com/truckingsim/bootstrap-select/compare/ebca3af...db4dc20

If you put in those changes it should fix your problem.

@jdenwar
Copy link
Author

jdenwar commented Feb 13, 2014

Thanks truckingsim. That solved the issue.

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

3 participants