Skip to content

Commit

Permalink
fix(clerk-js): Reset CodeControl when resetting wizard in VerifyDomai…
Browse files Browse the repository at this point in the history
…nPage (#2200) (#2204)
  • Loading branch information
panteliselef authored Nov 24, 2023
1 parent 47be2dc commit d1fae1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/clever-moose-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/clerk-js': patch
---

Reset OTP field when pressing "Cancel" in VerifyDomainPage inside `<OrganziatoinProfile/>`.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ export const VerifyDomainPage = withCardStateProvider(() => {
textVariant='buttonExtraSmallBold'
type='reset'
isDisabled={status.isLoading || success}
onClick={wizard.prevStep}
onClick={() => {
codeControlState.clearFeedback();
codeControl.reset();
wizard.prevStep();
}}
localizationKey={localizationKeys('userProfile.formButtonReset')}
/>
</FormButtonContainer>
Expand Down

0 comments on commit d1fae1f

Please sign in to comment.