Closed bgrinter closed 1 year ago
Ok - worked this one out once I had a deep dive...
The first step was to create a simple app.js file to hold some standard script.
Set a default theme
$.fn.select2.defaults.set('theme', 'bootstrap4');
Then, set all selects to use select2
$('select option:first-child').each(function() {
console.log($(this).parent().select2());
if (!$(this).val()) {
$(this).parent().select2({
debug: true,
allowClear: true,
placeholder: ''
});
} else {
$(this).parent().select2();
}
});
After this, I get my fancy select2 dropdowns.
Hopefully this helps someone else!
Unable to implement select2 dropdowns and wondering what I've missed or done wrong
AdminLTE allows for select2 dropdowns as seen here https://adminlte.io/themes/v3/pages/forms/advanced.html
I've successfully implemented CakeLTE however am find the dropdowns are just a normal style
Feedback / tips / suggestions greatly appreciated!