This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-11
Channels
- # announcements (3)
- # babashka (6)
- # babashka-sci-dev (37)
- # beginners (39)
- # calva (1)
- # clj-kondo (55)
- # clj-on-windows (1)
- # cljdoc (1)
- # clojure (30)
- # clojure-dev (3)
- # clojure-europe (8)
- # clojure-losangeles (1)
- # clojure-morsels (1)
- # clojurescript (26)
- # conjure (8)
- # graalvm (5)
- # helix (6)
- # hyperfiddle (12)
- # meander (6)
- # minecraft (1)
- # pathom (17)
- # polylith (1)
- # releases (2)
- # shadow-cljs (2)
- # sql (1)
- # squint (4)
Hi, is there anyway to access to original dom/on-change
are you trying to get an old example working? paste here and i will upgrade it
actually, I'm trying to fix the todo-mvc demo (the toggle-all feature, specifically):
(let [active (p/server (todo-count db :active))
all (p/server (todo-count db :all))
done (p/server (todo-count db :done))]
(ui/checkbox {::dom/class "toggle-all"
::dom/on-change print
::ui/value (zero? active)
::ui/input-event (p/fn [e]
(let [any-actives? (-> e :target :checked)]
(p/server (transact! (toggle-all! db any-actives?)))))
::ui/pending {::dom/aria-busy true}}))
(dom/label {:for "toggle-all"} "Mark all as complete")
for some reason checkbox doesn't receive the click event, and I'm trying to debug it so I wanted to check the browser native event handlersnvm fixed 😄
the click was missed because it the checkbox was missing an id that relates it to the label
Oh, thanks
Do you know if it's possible to fix without a global id? ids break the "todomvc composed" demo – we can gensym i guess, or uuid
good idea
can I pr somehow?
sure you can PR to photon github repo
Is it a regular fork -> pr flow?