mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-24 06:54:03 +03:00
Rename function.
This commit is contained in:
parent
203ef32bea
commit
6bfd076baf
@ -210,7 +210,7 @@ view maybeUrl sharedModel model app =
|
||||
pendingCreation : Result (FormParser.FieldErrors String) NewItem
|
||||
pendingCreation =
|
||||
form
|
||||
|> FormParser.runNew app app.data
|
||||
|> FormParser.parse app app.data
|
||||
|> .result
|
||||
|> parseIgnoreErrors
|
||||
in
|
||||
|
@ -338,7 +338,7 @@ view maybeUrl sharedModel model app =
|
||||
pendingCreation : Maybe NewItem
|
||||
pendingCreation =
|
||||
form
|
||||
|> FormParser.runNew app app.data
|
||||
|> FormParser.parse app app.data
|
||||
|> .result
|
||||
|> parseIgnoreErrors
|
||||
|> Result.toMaybe
|
||||
|
@ -6,7 +6,7 @@ module Pages.FormParser exposing
|
||||
, ParsedField, ok
|
||||
, Context, ViewField
|
||||
, renderHtml, renderStyledHtml
|
||||
, runNew, runOneOfServerSide, runServerSide
|
||||
, parse, runOneOfServerSide, runServerSide
|
||||
, FieldDefinition(..)
|
||||
)
|
||||
|
||||
@ -44,7 +44,7 @@ module Pages.FormParser exposing
|
||||
|
||||
## Running Parsers
|
||||
|
||||
@docs runNew, runOneOfServerSide, runServerSide
|
||||
@docs parse, runOneOfServerSide, runServerSide
|
||||
|
||||
|
||||
## Internal-Only?
|
||||
@ -415,16 +415,15 @@ mergeResults parsed =
|
||||
|
||||
|
||||
{-| -}
|
||||
runNew :
|
||||
parse :
|
||||
AppContext app
|
||||
-> data
|
||||
---> CombinedParser error parsed data (Context error -> view)
|
||||
-> Form error ( Maybe parsed, FieldErrors error ) data (Context error -> view)
|
||||
->
|
||||
{ result : ( Maybe parsed, FieldErrors error )
|
||||
, view : view
|
||||
}
|
||||
runNew app data (Form fieldDefinitions parser _) =
|
||||
parse app data (Form fieldDefinitions parser _) =
|
||||
-- TODO Get transition context from `app` so you can check if the current form is being submitted
|
||||
-- TODO either as a transition or a fetcher? Should be easy enough to check for the `id` on either of those?
|
||||
let
|
||||
|
Loading…
Reference in New Issue
Block a user