Hi!
I have a checkbox which state may be changed on other item click. I have
implemented this with the following code:
```
(defn checkbox [state] ;; - 'state' is a Reagent atom
[:input
{:type :checkbox
:checked @state
:on-click #(swap! state not)
:value (if @state "on" "off")
:on-change #(.log js/console "changed!" (.-checked (.-target %)))}])
```
But in this case on-change event is fired only if I click directly to checkbox.
When I modify 'state' atom outside (on other item click), checkbox is displayed
correctly, but on-change event is not fired. How to fix this?
Thanks in advance!
--
Note that posts from new members are moderated - please be patient with your
first post.
---
You received this message because you are subscribed to the Google Groups
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/clojurescript.