From cef78c3c09dbb2a67a5e800e87d35c235ba76b93 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Fri, 11 Aug 2023 19:59:28 +0300 Subject: [PATCH] fix(clerk-js): Clear formField error when submitting in `AddDomainPage` (#1589) --- .changeset/selfish-avocados-serve.md | 2 ++ .../src/ui/components/OrganizationProfile/AddDomainPage.tsx | 1 + 2 files changed, 3 insertions(+) create mode 100644 .changeset/selfish-avocados-serve.md diff --git a/.changeset/selfish-avocados-serve.md b/.changeset/selfish-avocados-serve.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/selfish-avocados-serve.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/AddDomainPage.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/AddDomainPage.tsx index 8d7f8e5cd0..e5bd8214f6 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/AddDomainPage.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/AddDomainPage.tsx @@ -28,6 +28,7 @@ export const AddDomainPage = withCardStateProvider(() => { const canSubmit = organization.name !== nameField.value; const onSubmit = (e: React.FormEvent) => { + nameField.setError(undefined); e.preventDefault(); return organization .createDomain(nameField.value)