I am trying to make a Select box with multiple options. But I am having 
problems on retrieving all values. I get only one value returned instead of 
all the selected.
This is written for re-frame, but the concept should apply to reagent too.
So how do I retrieve multiple values at the on-change part?

(defn country-select [] (let [countries (rf/subscribe [:countries]) 
search-countries (rf/subscribe [:search-country])] [:div.form-group [:label 
"Land:"] [:select {:class "form-control" :multiple true :id "country-select" 
:value @(rf/subscribe [:search-country]) :on-change #(rf/dispatch [
:search-country-change (-> % .-target .-value)])} [:option ""] (doall (for [
country @countries] ^{:key (:country_id country)} [:option {:key (
:country_id country)} (:name country)]))]]))

Thanks in advance

You received this message because you are subscribed to the Google Groups 
"Reagent-Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to reagent-project+unsubscr...@googlegroups.com.
To post to this group, send email to reagent-project@googlegroups.com.
Visit this group at https://groups.google.com/group/reagent-project.
For more options, visit https://groups.google.com/d/optout.

Reply via email to