Hello
How to load bootstrap-select so that it is loaded faster? Because it takes 1 second before loading my select, it is relatively long.
Same here. Everything else has loaded before the select, and even then it takes it 0.5 seconds to load. I only have half a dozen options in the list too!!
I am having this issue as well. It is especially noticeable if you have many images or elements on the page, it seems to wait for them all to finish loading before it shows the select.
I fixed the rendering delay by loading only jQuery and Bootstrap-Select in the <head> and the rest of the JS including Bootstrap below the </body>, then just after each </select>, add this:
<script type="text/javascript">$('#myselect').selectpicker('render');</script>
Now all selects load before the page has finished rendering.
I too have the same issue. I did what davidenco suggested and it is fixed.
While the rendering of the selects after davidenco fix helped, now when I use the select and pick a option it is slow to close the menu.
Only is enough, hope we see the improvement next release
same problem.fixed by
$(function(){
$(".selectpicker").selectpicker('render');
})
Or this?
$({$(".selectpicker").selectpicker('render');});
Thank you so much..!
Note to self:
Use document.ready instead of window.load to auto-initialize bootstrap-select.
have more than 30 select boxes in my page. Each select box has around 300+ options. So we staretd using this select picker to allow user to quickly type and pick the one. However, now its making lots of performance issues and we are in trouble now.
This select box has been created as reusuable angular component and we apply selectpicker in once the view was initialized using ### ngAfterViewInit
Each of them may or may not have a initial value set
ngAfterViewInit() {
jQuery("#mySelect10").selectpicker();
jQuery("#mySelect10").selectpicker('val', 10); // sets the value, if it is present, ex 10 is value here
}
I tried with but still no change. Takes more time to load the page
ngAfterViewInit() {
jQuery("#mySelect10").selectpicker('render');
jQuery("#mySelect10").selectpicker('val', 10); // sets the value, if it is present, ex 10 is value here
}
In IE 11, it is even very slow. User has to wait for nearly 30 seconds to see the view/UI.
@caseyjhol Is there any workaround on this performance issue? The plugin looks really great, except this performance issue
I tired updated to version 1.13.10, but still no luck :(
This change will be a part of the v1.14.0 release. This issue will be updated after it's made available.
Released in v1.14.0-beta!
Still very slow on page with multiple selects with thousands of options
@ubertil With v1.14.0-beta? Can you link me to an example?
Most helpful comment
I fixed the rendering delay by loading only jQuery and Bootstrap-Select in the
<head>and the rest of the JS including Bootstrap below the</body>, then just after each</select>, add this:<script type="text/javascript">$('#myselect').selectpicker('render');</script>Now all selects load before the page has finished rendering.