turbo:load doesn't seem to be working, try a specific controller method to open it
This commit is contained in:
@@ -5,11 +5,13 @@ export default class extends Controller {
|
||||
static targets = [ "dialog" ]
|
||||
static values = {
|
||||
modal: { type: Boolean, default: false },
|
||||
sizing: { type: Boolean, default: true }
|
||||
sizing: { type: Boolean, default: true },
|
||||
autoOpen: { type: Boolean, default: false }
|
||||
}
|
||||
|
||||
connect() {
|
||||
this.dialogTarget.setAttribute("aria-hidden", "true")
|
||||
if (this.autoOpenValue) this.open()
|
||||
}
|
||||
|
||||
open() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div data-controller="dialog" data-action="turbo:load@window->dialog#open keydown.esc->dialog#close" data-dialog-modal-value="true">
|
||||
<div data-controller="dialog" data-dialog-auto-open-value="true" data-dialog-modal-value="true" data-action="keydown.esc->dialog#close">
|
||||
<dialog class="welcome-letter panel panel--wide shadow dialog" data-dialog-target="dialog">
|
||||
<button class="welcome-letter__close btn txt-x-small" data-action="dialog#close">
|
||||
<%= icon_tag "close" %>
|
||||
|
||||
Reference in New Issue
Block a user