From 649ba463fc165050d5002bedebe753433f0293e5 Mon Sep 17 00:00:00 2001 From: panteliselef Date: Thu, 3 Aug 2023 11:19:54 +0300 Subject: [PATCH] chore(clerk-js): Eliminate error for invalid props --- .changeset/twelve-weeks-poke.md | 2 ++ .../ui/components/OrganizationProfile/InviteMembersForm.tsx | 3 +++ packages/clerk-js/src/ui/utils/useFormControl.ts | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/twelve-weeks-poke.md diff --git a/.changeset/twelve-weeks-poke.md b/.changeset/twelve-weeks-poke.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/twelve-weeks-poke.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx b/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx index 7ed1e1176b..274a46ca90 100644 --- a/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx +++ b/packages/clerk-js/src/ui/components/OrganizationProfile/InviteMembersForm.tsx @@ -65,6 +65,9 @@ export const InviteMembersForm = (props: InviteMembersFormProps) => { setSuccessful, successfulText, warningText, + validatePassword, + setHasPassedComplexity, + hasPassedComplexity, /* eslint-enable @typescript-eslint/no-unused-vars */ ...restEmailAddressProps }, diff --git a/packages/clerk-js/src/ui/utils/useFormControl.ts b/packages/clerk-js/src/ui/utils/useFormControl.ts index 9b30490eca..66a5982e82 100644 --- a/packages/clerk-js/src/ui/utils/useFormControl.ts +++ b/packages/clerk-js/src/ui/utils/useFormControl.ts @@ -123,7 +123,7 @@ export const useFormControl = ( }; // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { defaultChecked, validatePassword: validatePasswordProp, ...restOpts } = opts; + const { defaultChecked, validatePassword: validatePasswordProp, buildErrorMessage, ...restOpts } = opts; const props = { id, @@ -148,7 +148,7 @@ export const useFormControl = ( ...restOpts, }; - return { props, ...props, setError, setValue, setChecked }; + return { props, ...props, buildErrorMessage, setError, setValue, setChecked }; }; type FormControlStateLike = Pick;