Bootstrap-select: not working with Bootstrap v4.0.0-alpha.6

Created on 15 May 2017  路  4Comments  路  Source: snapappointments/bootstrap-select

got the following js libs:

    <script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/css/bootstrap-select.min.css">
    <!-- Latest compiled and minified JavaScript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.2/js/bootstrap-select.min.js"></script>

    <script src="/js/base.js"></script>

with the standard example select:

<select class="selectpicker" multiple>
     <option>Mustard</option>
    <option>Ketchup</option>
    <option>Relish</option>
</select>

The console is not showing any errors.
On loading the site, the dropdown shows "Nothing selected", if I click on it, the openend dropdown is empty.
I tried with the snippet

$('.selectpicker').selectpicker({
  style: 'btn-info',
  size: 4
});

in my base.js and without it, showing same result.

Most helpful comment

@lorsulic I have the same issue and for my case I fixed it by this code.

// Hotfix for Bootstrap v4.0.0-alpha.6
.bootstrap-select.btn-group .dropdown-menu.inner {
  display: block;
}

All 4 comments

@lorsulic I have the same issue and for my case I fixed it by this code.

// Hotfix for Bootstrap v4.0.0-alpha.6
.bootstrap-select.btn-group .dropdown-menu.inner {
  display: block;
}

Please search next time. See #1135.

I've submitted a new pull request here https://github.com/silviomoreto/bootstrap-select/pull/1748 that works with the Bootstrap4 alpha-6, which you can install as follows.

Bootstrap 4 support has officially been added in v1.13.0!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alex-piccione picture alex-piccione  路  4Comments

anton164 picture anton164  路  4Comments

dacavcosta picture dacavcosta  路  3Comments

edwolfe807 picture edwolfe807  路  3Comments

EmilMoe picture EmilMoe  路  4Comments