Skip to content

Commit

Permalink
fix(clerk-js): Disable emailAdress field in SignUp if fields.emailAdd…
Browse files Browse the repository at this point in the history
…ress.disabled is true (#2990)
  • Loading branch information
nikospapcom authored Mar 13, 2024
1 parent 386c9d4 commit 7d3aa44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/loud-pianos-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Disable emailAdress field in SignUp if fields.emailAddress.disabled is true
1 change: 1 addition & 0 deletions packages/clerk-js/src/ui/components/SignUp/SignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ export const SignUpForm = (props: SignUpFormProps) => {
{...formState.emailAddress.props}
isRequired={fields.emailAddress!.required}
isOptional={!fields.emailAddress!.required}
isDisabled={fields.emailAddress!.disabled}
actionLabel={canToggleEmailPhone ? 'Use phone instead' : undefined}
onActionClicked={canToggleEmailPhone ? () => handleEmailPhoneToggle('phoneNumber') : undefined}
/>
Expand Down

0 comments on commit 7d3aa44

Please sign in to comment.