Thank you kind people!

Gusztáv, cool! It worked fine for me. I've never come to the simple idea of
setting the value outside. I don't see any downside of this now.

For reference, here <https://ellie-app.com/DY2qpJnRNDa1/0> is what I tried
(thanks Ellie). This is tiny example but my real app worked fine too.

I hope the normal value attribute will work like this someday. But for now,
this seems a good workaround :D



2017-03-15 14:07 GMT+09:00 Gusztáv Szikszai <cyber.gusz...@gmail.com>:

> This should be part of elm-lang/dom as a task or a command. I have my own
> dom package which elm-ui uses and it has this functionality, if you don't
> want to use non official packages than i would suggest adding and *id 
> *attribute
> to your input and creating a port (port setValue : String -> String -> Cmd
> msg) that sets it's value and then calling that command when you want to
> set it.
>
> On Tuesday, March 14, 2017 at 7:28:06 AM UTC+1, Yosuke Torii wrote:
>>
>> There have been many discussions about this, but please allow me to pick
>> it up again.
>>
>> As far as I know, the problem is briefly summarized as follows:
>>
>> `Html.Attributes.value` behaves crazily when we type rapidly.
>> `Html.Attributes.defaultValue` solves this but it does not allow to
>> programmatically change the value. There seems no solution for satisfying
>> both of these requirements.
>>
>> I believe this is very common requirement of web/gui apps. How do people
>> address this? Personally, I've been blocked on this for 6 months... So I
>> don't want a clean solution. Any workaround / hack is welcome.
>>
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Elm Discuss" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/elm-discuss/kdNuohiIX4U/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to