On Tuesday, March 31, 2015 at 12:04:29 AM UTC+8, Erik Price wrote:
> https://github.com/facebook/react/blob/master/docs/docs/07-forms.md#why-select-value
> 
> 
> 
> On Mon, Mar 30, 2015 at 4:41 AM, Bin Li <[email protected]> wrote:
> I have a reagent component :
> 
> 
> 
> (defn duallist2 []
> 
>   [:div.row
> 
>    [:div.col-md-7
> 
>     [:select {:multiple "multiple"
> 
>               :size "10"
> 
>               :name "duallistbox_demo"
> 
>               :class "demo"
> 
>               :style {:display "none"}}
> 
>      [:option {:value "option1"} "Option 1"]
> 
>      [:option {:value "option2" :selected "selected"} "Option 2"]
> 
>      [:option {:value "option3" :selected "selected"} "Option 3"]
> 
>      [:option {:value "option4"} "Option 4"]
> 
>      ]
> 
>     ]
> 
>    ]
> 
>   )
> 
> 
> 
> I want to add attribute {:multiple "multiple"} to <select>, and {:selected 
> "selected"} to <option>, but I got html generated like this:
> 
> 
> 
> 
> 
> <select multiple="" size="10" name="duallistbox_demo2" class="demo2"
> 
>         style="display: none;" data-reactid=".0.0.0">
> 
>         <option value="option1" data-reactid=".0.0.0.0">Option 1</option>
> 
>         <option value="option2" selected="" data-reactid=".0.0.0.1">Option 2
> 
>         </option>
> 
>         <option value="option3" selected="" data-reactid=".0.0.0.2">Option 3
> 
>         </option>
> 
>         <option value="option5" data-reactid=".0.0.0.3">Option 5</option>
> 
> </select>
> 
> 
> 
> You can see multiple="" and selected="", the values are not as expected.
> 
> 
> 
> Not sure why this happen , any help will be appreciated.
> 
> 
> 
> 
> 
> 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 http://groups.google.com/group/clojurescript.

Thanks for feedback! 

Posted same question on duplicated thread .. 
https://groups.google.com/forum/#!topic/clojurescript/JDDRHFaaXY4

-- 
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 http://groups.google.com/group/clojurescript.

Reply via email to