From f9dca56922e0f67e6b2a5192bbed031dcb3e536b Mon Sep 17 00:00:00 2001 From: swaysway <7465495+SwaySway@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:26:38 +0000 Subject: [PATCH] fix: onSubmit for custom forms --- ...studio-ui-codegen-react-forms.test.ts.snap | 18 +- .../__utils__/amplify-renderer-generator.ts | 37 ++- .../studio-ui-codegen-react-forms.test.ts | 33 +-- .../lib/amplify-ui-renderers/form.ts | 253 ++++++++++-------- .../lib/forms/form-renderer-helper.ts | 2 +- 5 files changed, 181 insertions(+), 162 deletions(-) diff --git a/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react-forms.test.ts.snap b/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react-forms.test.ts.snap index 9fa720874..f959bc8ce 100644 --- a/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react-forms.test.ts.snap +++ b/packages/codegen-ui-react/lib/__tests__/__snapshots__/studio-ui-codegen-react-forms.test.ts.snap @@ -9,7 +9,6 @@ import { useStateMutationAction, } from \\"@aws-amplify/ui-react/internal\\"; import { Button, Flex, Grid, TextField } from \\"@aws-amplify/ui-react\\"; -import { DataStore } from \\"aws-amplify\\"; export default function customDataForm(props) { const { onSubmit: customDataFormOnSubmit, @@ -26,22 +25,7 @@ export default function customDataForm(props) {