Bootstrap 5 / Bootstrap-select how to append to datatables column select

Bootstrap 5 / Bootstrap-select how to append to datatables column select

martin1223345martin1223345 Posts: 61Questions: 18Answers: 0

http://live.datatables.net/vosekusi/1/edit

See above example. I am trying to append the bootstrap-select plugin to use its layout and live-search function in the th colomn. I don't get it working, it is not showing the options (they are generated in the console). What am I doing wrong?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 14,129Questions: 25Answers: 3,331
    Answer ✓

    Your test case has this error:

    Uncaught TypeError: $(...).selectpicker is not a function

    You don't have the bootstrap-select.js installed. Take a look at the bootstrap-select docs for the requirements. Specifically things like this:

    If using bootstrap-select with Bootstrap v4+, you'll also need Popper.js.

    Not sure if it support Bootstrap 5.

    Kevin

  • martin1223345martin1223345 Posts: 61Questions: 18Answers: 0

    Hmm, I had that present. It will work with bootstrap 5. I use the extention in other parts of my website. After some more research I got this code working. See example, for those who want to make use of it in Bootstrap 5.

    live.datatables.net/lomevebo/1/edit

Sign In or Register to comment.