Bootsrap-select for Bootrap 5

Bootstrap-select for Bootstrap 5  (At least it work at Feb 2023)

 

Due to the recent update from bootstrap 4 to bootstrap 5 , it cause the boostrap-select not working.

Any due to change from cdn to webpack pre-compiled

So the fix is using webpack .. I think.


First update the package json to use beta version.

"bootstrap-select": "snapappointments/bootstrap-select#v1.14-dev"

Second at the main compile script add the following:


const bootstrap = window.bootstrap = require('bootstrap');
require('bootstrap-select/js/bootstrap-select');

then compiled.( do Remember remove the existing bootstrap import else the compiles will failed.

Comments

Popular posts from this blog

Reading and Writing Operation of SRAM

Reading & Writing Operation of DRAM

Method to Convert from Stream to Json C#