mirror of
https://github.com/wallabag/wallabag.git
synced 2025-06-27 16:36:00 +00:00
Extract Materialize Form Select controller
This commit is contained in:
parent
1b683dbb05
commit
a7a4c5fefb
3 changed files with 15 additions and 5 deletions
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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue