Closed leijae closed 4 years ago
Hello @leijae,
Thank you for using our products, please try to reinitialize the .selectpicker after you populate it:
// Activate bootstrap-select
if ($(".selectpicker").length != 0) {
$(".selectpicker").selectpicker();
}
Hope that information helps you. Please let us know if we can help you with anything else. All the best, Stefan
Hi Stefan,
Thanks for the tip, but unfortunately, it seems like initialization at the view doesn't fix the error:
The following is the code rendered:
And this is the UI:
Additionally this is from the linked .js file
Then, it's probably from the scripts that you have loaded into your file project. Try to load bootstrap-material-design before the bootstrap-select.
oh my gosh, so silly... that's what it was. Thanks!
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Expected Behavior
Material Kit Pro bootstrap select picker; dropdown select list should be styled as mentioned here in documentation
Current Behavior
What is the current behavior? Error in browser console jquery.min.js:1251 Uncaught TypeError: $(...).selectpicker is not a function at HTMLDocument. (material-kit.js?v=2.0.6:276)
at j (jquery.min.js:1197)
at k (jquery.min.js:1203)
Failure Information (for bugs)
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
the following HTML is produced in the browser:
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.