6

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.

4

2 回答 2

15

在设置值之前,请确保 selectpicker 已完全初始化:

$('.selectpicker').selectpicker();
$('.selectpicker').selectpicker('val', 'All');
于 2016-08-10T10:09:22.260 回答
0

刚遇到类似的问题,但发现

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

没有解决它,我需要调用刷新;

$('#myselectpicker').selectpicker('refresh');
于 2018-08-12T00:40:36.037 回答