rleiva rleiva - 2 months ago 27
Javascript Question

d.stopPropagation is not a function on bootstrap select-picker

I have and issue on my site,

and the select picker works fine a lot of time, but without making any changes on the code, the select-picker stop working.

The error is:


bootstrap-select.min.js:7 Uncaught TypeError: d.stopPropagation is not a function


I already tried updating the version of the library, but all the versions I tried (1.10, 1.7, 1.6 and 1.5) looks with the same issue.

Can you bring me some ideas of what's happening? If you can see the console on the website would be awesome.

Answer

Be sure the selectpicker is fully initialized before setting the value:

$('.selectpicker').selectpicker();
$('.selectpicker').selectpicker('val', 'All');
Comments