You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 2, 2024. It is now read-only.
In Elm 0.16, you'd write this code in the submit event of a button for a form:
let
submitClick =case Form.getOutput form ofJust user ->
onClick address (SubmitUser user)Nothing->
onClick formAddress Form.Submit
So you can call the SubmitUser message to your application once your form has actual output without validation errors.
In 0.17, all Html types now have an Msg attributed to them. This causes the above case statement in the let binding to produce two different types, because one produces Html MyApp.Msg and the other Html Form.Msg.
I noticed the example app in tag 3.0.0 does not even use SubmitUser. But now, I'm trying to update my own app, and I run into this issue.
How would I port that let binding I posted above to 0.17?
The text was updated successfully, but these errors were encountered:
You can pattern match on Form action and Form.targetValue, if you got Submit and Just ... then you can proceed form result, or else call Form.update as before.
In Elm 0.16, you'd write this code in the submit event of a button for a form:
So you can call the
SubmitUser
message to your application once your form has actual output without validation errors.In 0.17, all
Html
types now have anMsg
attributed to them. This causes the abovecase
statement in thelet
binding to produce two different types, because one producesHtml MyApp.Msg
and the otherHtml Form.Msg
.I noticed the example app in tag
3.0.0
does not even useSubmitUser
. But now, I'm trying to update my own app, and I run into this issue.How would I port that
let
binding I posted above to 0.17?The text was updated successfully, but these errors were encountered: