Bootstrap select error: Cannot set property '_menu' of undefined

user3288891 picture user3288891 · Feb 27, 2018 · Viewed 7.2k times · Source

I've implemented select box using bootstrap-select in angular 5. I've used latest version of Bootstrap select to make it work angular 5. But it throws below error.

bootstrap-select.js:1904 Uncaught TypeError: Cannot set property '_menu' of undefined

<form>
     <select class="selectpicker" data-live-search="true">
         <option>Mustard</option>
         <option>Ketchup</option>
         <option>Relish</option>
     </select>
</form>

View Plunkr

Answer

user3288891 picture user3288891 · Feb 28, 2018

Bootstrap-select v1.13.0-dev is compatible with Boostrap 4. You can find Compatible bootstrap-select files here Boostrap-select

Isue is that i am not loading required jquery and popper.min.js files into project directory. Also use non minified version of bootstrap select from repository code. I've solved this issue by adding above files.