We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2727ef commit 9c28a1fCopy full SHA for 9c28a1f
1 file changed
hypha/templates/includes/_modal-placeholder.html
@@ -9,6 +9,7 @@
9
<div
10
x-cloak
11
x-data="{ show: false }"
12
+ x-init="$watch('show', v => { if (!v) $nextTick(() => { $refs.modalContent.innerHTML = '' }) })"
13
@keydown.window.escape="show = false"
14
x-show="show"
15
class="relative z-10"
@@ -45,6 +46,7 @@
45
46
x-description="Modal panel, show/hide based on modal state."
47
class="relative w-full text-left rounded-lg border shadow-xl transition-all transform sm:my-8 sm:max-w-lg bg-base-100"
48
id="htmx-modal"
49
+ x-ref="modalContent"
50
hx-target="this"
51
@htmx:after-swap="show = true"
52
@htmx:before-swap="if(!$event.detail.xhr.response) { show = false; $event.detail.shouldSwap = false;}"
0 commit comments