Model menus, modal edit and layout improvements
This commit is contained in:
parent
7b0f05a448
commit
70500c49a1
35 changed files with 1079 additions and 148 deletions
16
app/javascript/controllers/dropdown_menu_controller.js
Normal file
16
app/javascript/controllers/dropdown_menu_controller.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
// Connects to data-controller="dropdown-menu"
|
||||
export default class extends Controller {
|
||||
connect() {
|
||||
const x = this.element
|
||||
this.element.addEventListener("turbo:click", e => {
|
||||
console.log("turbo visit dropdown", e, this.element)
|
||||
this.element.removeAttribute("open");
|
||||
})
|
||||
this.element.addEventListener("turbo:submit-start", e => {
|
||||
console.log("turbo submit dropdown", e, this.element)
|
||||
this.element.removeAttribute("open");
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue