cleans stuff up.

This commit is contained in:
2024-11-23 21:13:15 -08:00
parent 39d8e6e71f
commit 98dcdb5a55
12 changed files with 79 additions and 92 deletions

View File

@@ -67,6 +67,14 @@
alpine-disappear)
(dissoc params :data-key)))
(defn alpine-mount-then-disappear [{:keys [data-key] :as params :or {data-key "show"}} ]
(merge (-> {:x-data (json {data-key true})
:x-init (format "$nextTick(() => %s=false)" (name data-key))
:x-show (name data-key)}
alpine-appear
alpine-disappear)
(dissoc params :data-key)))
(defn bind-alpine-vals [m field->alpine-field]
(assoc m "x-bind:hx-vals"