[SOLVED] Boostrap-select is not loading options in angular 8

Issue

I am using bootstrap select 1.7.5 with bootstrap 3.4.0 but there is some issue bootstrap-select not loading the options

<select class="selectpicker" id="store-type"name="select-identification-number">
   <option>EIN</option>
   <option>SSN / ESN</option>
</select>

Solution

Did you include both the CSS, JS files in your index.html?

If you inspect element, you will see that the class selectpicker has the property display: none!important; which is why you don’t see it… just remove this class and you’ll see it

relevant HTML:

<select class="" id="store-type" name="select-identification-number">
   <option>EIN</option>
   <option>SSN / ESN</option>
</select>

example on stackblitz here

but having a package which requires JS file is not the best idea… you should go for an angular2+ compatible package which gives you this feature…

Answered By – Akber Iqbal

Answer Checked By – Jay B. (BugsFixing Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *