2022-07-24 20:23:12 +02:00
|
|
|
const bootstrap = window.bootstrap = require('bootstrap'); // without this bootstrap-select crashes with `undefined bootstrap`
|
|
|
|
require('bootstrap-select/js/bootstrap-select'); // we have to manually require the working js file
|
|
|
|
|
2022-03-06 23:27:20 +01:00
|
|
|
import {Controller} from "@hotwired/stimulus";
|
2022-07-24 20:23:12 +02:00
|
|
|
//import "bootstrap-select/js/bootstrap-select";
|
|
|
|
import 'bootstrap-select/sass/bootstrap-select.scss';
|
2022-03-06 23:27:20 +01:00
|
|
|
|
|
|
|
export default class extends Controller {
|
|
|
|
connect() {
|
|
|
|
$(this.element).selectpicker({
|
|
|
|
dropdownAlignRight: 'auto',
|
|
|
|
container: '#content',
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|