1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-06-27 16:36:00 +00:00

Extract Materialize Dropdown controller

This commit is contained in:
Yassine Guedidi 2025-03-01 00:41:57 +01:00
parent a69ea46945
commit 1b683dbb05
3 changed files with 17 additions and 8 deletions

View file

@ -0,0 +1,16 @@
import { Controller } from '@hotwired/stimulus';
import M from '@materializecss/materialize';
export default class extends Controller {
connect() {
this.instance = M.Dropdown.init(this.element, {
hover: false,
coverTrigger: false,
constrainWidth: false,
});
}
disconnect() {
this.instance.destroy();
}
}

View file

@ -274,13 +274,6 @@ const articleScroll = () => {
$(document).ready(() => {
$('select').formSelect();
$('.dropdown-trigger').dropdown({ hover: false });
$('.dropdown-trigger[data-covertrigger="false"][data-constrainwidth="false"]').dropdown({
hover: false,
coverTrigger: false,
constrainWidth: false,
});
$('.fixed-action-btn').floatingActionButton();
stickyNav();