Search code examples
bootstrap-5bootstrap-select

bootstrap-select not working together with bootstrap 5


I am using the library bootstrap-select, recently I needed to upgrade from bootstrap version 4 to 5, according to the bootstrap-select side there should be support and no issue with that.

Here is a link zu the jsFiddle

enter image description here

This is what I m trying to do, and it worked before the upgrade:

const inputScreen = $('<select class="selectpicker"><option>test</option></select>').appendTo(conScreen);
inputScreen.selectpicker();

However, the dropdown elements are being shown, but I cant open it.

enter image description here

There is no error in the console. The only thing i can see, is that there is an hidden element which never gots displayed: enter image description here


Solution

  • i figgured the answer out myself, it is about the position of the include. Popper.js needs to be included before bootstrap v5. That did the job!