Initialize selectpicker via stimulus controller.

This commit is contained in:
Jan Böhmer 2022-03-06 23:27:20 +01:00
parent f1ea25cad2
commit f276c436ae
16 changed files with 31 additions and 32 deletions

View file

@ -0,0 +1,12 @@
import {Controller} from "@hotwired/stimulus";
import "bootstrap-select";
import 'bootstrap-select/dist/css/bootstrap-select.css'
export default class extends Controller {
connect() {
$(this.element).selectpicker({
dropdownAlignRight: 'auto',
container: '#content',
});
}
}