From f97b72dc551eeac549accd2360da47e1298ef5d5 Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 14 Jun 2022 19:09:19 +0800 Subject: [PATCH] fix: sign in/sign up with enter key --- packages/core/client/src/schema-component/antd/form-v2/Form.tsx | 2 +- packages/core/client/src/user/SigninPage.tsx | 2 +- packages/core/client/src/user/SignupPage.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/core/client/src/schema-component/antd/form-v2/Form.tsx b/packages/core/client/src/schema-component/antd/form-v2/Form.tsx index 3e20b4275..828b953df 100644 --- a/packages/core/client/src/schema-component/antd/form-v2/Form.tsx +++ b/packages/core/client/src/schema-component/antd/form-v2/Form.tsx @@ -80,7 +80,7 @@ const WithoutForm = (props) => { createForm({ effects() { onFormInputChange((form) => { - setFormValueChanged(true); + setFormValueChanged?.(true); }); }, }), diff --git a/packages/core/client/src/user/SigninPage.tsx b/packages/core/client/src/user/SigninPage.tsx index 4ca16a583..0b4f1c32c 100644 --- a/packages/core/client/src/user/SigninPage.tsx +++ b/packages/core/client/src/user/SigninPage.tsx @@ -7,7 +7,7 @@ import { SchemaComponent, useAPIClient, useCurrentDocumentTitle, useSystemSettin const schema: ISchema = { type: 'object', name: uid(), - 'x-component': 'Form', + 'x-component': 'FormV2', properties: { email: { type: 'string', diff --git a/packages/core/client/src/user/SignupPage.tsx b/packages/core/client/src/user/SignupPage.tsx index 28a2d4b6a..cffdd51d4 100644 --- a/packages/core/client/src/user/SignupPage.tsx +++ b/packages/core/client/src/user/SignupPage.tsx @@ -8,7 +8,7 @@ import { SchemaComponent, useAPIClient, useCurrentDocumentTitle, useSystemSettin const schema: ISchema = { type: 'object', name: uid(), - 'x-component': 'Form', + 'x-component': 'FormV2', properties: { email: { type: 'string',