I'm trying to create a dropdown and I want to use the semantics of Html to
define the options inside the dropdown.
Because of reasons I want to replace the `option` element with a `div` and
in order to do that I need to access the information inside the elements.
How can I do that?
Here is some code that doesn't work:
import Html exposing (..)
dropdown props children =
let
chidLog = List.map (\c -> Debug.log "child" c) children
tags = List.map (\{tag} -> tag) children
in
select [] children
dd =
dropdown []
[ option [] [text "Male"]
, option [] [text "Female"]
]
main = dd
The Debug logs all the information I need but I cannot extract it other
than doing something very silly like converting to string and parsing that.
--
There is NO FATE, we are the creators.
blog: http://damoc.ro/
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.