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

2

7

I have an issue on my site, the select picker works fine a lot of time, but without making any changes on the code, the select-picker stopped 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.

Mockingbird answered 22/6, 2016 at 17:43 Comment(0)
P
16

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

$('.selectpicker').selectpicker();
$('.selectpicker').selectpicker('val', 'All');
Presser answered 10/8, 2016 at 10:9 Comment(0)
M
0

Just had a similar issue but found that

$('#myselectpicker').selectpicker();

did not resolve it and I needed to call refresh;

$('#myselectpicker').selectpicker('refresh');
Munster answered 12/8, 2018 at 0:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.