forked from wallabag/wallabag
Extract Materialize Form Select controller
This commit is contained in:
12
assets/controllers/materialize/form_select_controller.js
Normal file
12
assets/controllers/materialize/form_select_controller.js
Normal file
@ -0,0 +1,12 @@
|
||||
import { Controller } from '@hotwired/stimulus';
|
||||
import M from '@materializecss/materialize';
|
||||
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
this.instance = M.FormSelect.init(this.element.querySelector('select'));
|
||||
}
|
||||
|
||||
disconnect() {
|
||||
this.instance.destroy();
|
||||
}
|
||||
}
|
||||
@ -272,8 +272,6 @@ const articleScroll = () => {
|
||||
};
|
||||
|
||||
$(document).ready(() => {
|
||||
$('select').formSelect();
|
||||
|
||||
$('.fixed-action-btn').floatingActionButton();
|
||||
|
||||
stickyNav();
|
||||
|
||||
Reference in New Issue
Block a user