Hex Core JS
    Preparing search index...

    Function onUpdateSubmit

    • An onSubmit function for use in an update form that connects to a GraphQL API.

      Type Parameters

      • FV extends FormValues

      Parameters

      • formState: Pick<FormState<FV>, "formValues" | "initialFormValues" | "formChanged">

        A partial form state that contains at least formValues and formChanged.

      • applyUpdate: ApplyUpdateFunction<FV>

        A function that performs the update (e.g. makes an API request) and returns errors. Only the changed form values are passed to the applyUpdate function.

      Returns Promise<Success | Failure<FV>>