Skip to content

Commit 9c28a1f

Browse files
committed
Bug fix for count in confirm dialogs.
1 parent f2727ef commit 9c28a1f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

hypha/templates/includes/_modal-placeholder.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<div
1010
x-cloak
1111
x-data="{ show: false }"
12+
x-init="$watch('show', v => { if (!v) $nextTick(() => { $refs.modalContent.innerHTML = '' }) })"
1213
@keydown.window.escape="show = false"
1314
x-show="show"
1415
class="relative z-10"
@@ -45,6 +46,7 @@
4546
x-description="Modal panel, show/hide based on modal state."
4647
class="relative w-full text-left rounded-lg border shadow-xl transition-all transform sm:my-8 sm:max-w-lg bg-base-100"
4748
id="htmx-modal"
49+
x-ref="modalContent"
4850
hx-target="this"
4951
@htmx:after-swap="show = true"
5052
@htmx:before-swap="if(!$event.detail.xhr.response) { show = false; $event.detail.shouldSwap = false;}"

0 commit comments

Comments
 (0)