snapappointments / bootstrap-select

:rocket: The jQuery plugin that brings select elements into the 21st century with intuitive multiselection, searching, and much more.
https://developer.snapappointments.com/bootstrap-select/
MIT License
9.85k stars 2.72k forks source link

Display custom title + selected item in single select #2427

Open natasav opened 4 years ago

natasav commented 4 years ago

Before posting, please see guidelines for contributing. If you're submitting a bug report, see below.

Bug reports

A bug is a demonstrable problem that is caused by the code in the repository. Good bug reports are extremely helpful - thank you!

Guidelines for bug reports:

  1. Use the GitHub issue search. Check if the issue has already been reported.

  2. Check if the issue has been fixed. Try to reproduce it using the latest master or development branch in the repository.

  3. Provide environment details. Provide your operating system, browser(s), jQuery version, Bootstrap version, and bootstrap-select version.

  4. Create an isolated and reproducible test case. Create a reduced test case.

  5. Include a live example. Use this Plunker debugging template to share your isolated test cases. You can also make use of jsFiddle or JS Bin.

A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs.

Example:

Short and descriptive example bug report title

A summary of the issue and the browser/OS environment in which it occurs. If suitable, include the steps required to reproduce the bug.

  1. This is the first step
  2. This is the second step
  3. Further steps, etc.

<url> - a link to the reduced test case

Any other information you want to share that is relevant to the issue being reported. This might include the lines of code that you have identified as causing the bug, and potential solutions (and your opinions on their merits).

Erase the above text and being typing. Thanks!

Hesesses commented 4 years ago

Seems like the bug description is empty, but I can confirm that there is a problem with title tag:

My package.json


"bootstrap": "^4.4.1",
"bootstrap-select": "^1.13.13",
"jquery": "3.4.1",
"popper.js": "^1.16.1"

This works

<select class="selectpicker" title="Select" multiple>
  <option value="works">MULTIPLE WORKS</option>
</select>

And this doesnt

<select class="selectpicker" title="Select">
  <option value="not">WITHOUT MULTIPLE</option>
</select>

"works" means the selected option shows as title of the select component, when its not working, it shows "Select" as title after selection an option.