Fork me on GitHub
#reagent
<
2017-11-29
>
juhoteperi09:11:01

@souenzzo It is already usable with Reagent, helper function or something will be added later https://github.com/reagent-project/reagent/issues/319

maleghast16:11:04

Hello… I am trying to attach a function to onChange on a select box… How do I get the value of the select in my function..? (I realise that this is a dreadful n00b question, but I’ve been Googleing for an hour…)

juhoteperi16:11:30

The parameter to on-change fn is event, the event contains target property which points to the checkbox element, the element has checked property: (fn [event] (js/console.log (.. event -target -checked)))

juhoteperi16:11:33

Oops, I mixed select and checkbox, but just change checked to value

juhoteperi16:11:30

The parameter to on-change fn is event, the event contains target property which points to the checkbox element, the element has checked property: (fn [event] (js/console.log (.. event -target -checked)))