Using your code snippet, I created a project that changes the text value, as you would expect it to do. Is my code set up differently than yours?
https://github.com/canadaduane/elm-dd Initial state and "after clicking" state images are attached. -- Duane On Tuesday, December 27, 2016 at 4:02:28 PM UTC-7, Chris Van Vranken wrote: > > I am trying to render a text > <http://package.elm-lang.org/packages/elm-lang/html/2.0.0/Html#text>field > with Elm 0.18. The text is wrapped in a div and I need to re-render it > when my model changes. It will not update after the initial render, so its > initial value is always displayed even though the class of the div updates > properly and the style obviously changes. If I change the Html.text to > Html.input and set the input's value then the value changes are displayed > properly (but the styling is horrible). The Debug.log output also makes it > seem like it should be working. I would think Html.text is pretty > ubiquitous, so this seems like a silly question...but is Html.text working > properly in 0.18? Any ideas why this isn't working for me? Thanks, Chris. > > > My code comes from this example > <https://github.com/r31gN/elm-dropdown/blob/master/Example/Example.elm> and > looks like the following > > renderDropdownValueHtml : Dropdown -> Html Msg > renderDropdownValueHtml model = > let > isPlaceHolder = > (String.length model.value) == 0 > > dropdownValue = > if isPlaceHolder then > Debug.log "Render PlaceHolder" model.placeholder > else > Debug.log "Render Value" model.value > in > div > [ class <| > if isPlaceHolder then > "elm-dropdown__value is--placeholder" > else > "elm-dropdown__value" > , onClick ToggleDropdown > ] > [ text dropdownValue > ] > > > > -- 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.
