Skip to content

Add ability to clear fields on error in invite flows#405

Closed
thiva-k wants to merge 2 commits intoasgardeo:mainfrom
thiva-k:update-flow-error
Closed

Add ability to clear fields on error in invite flows#405
thiva-k wants to merge 2 commits intoasgardeo:mainfrom
thiva-k:update-flow-error

Conversation

@thiva-k
Copy link
Contributor

@thiva-k thiva-k commented Mar 16, 2026

This pull request improves the handling of form values during step transitions in the invite and accept invite flows. Instead of resetting form values to empty objects, it now clears values for only the relevant fields, preventing controlled inputs from becoming uncontrolled and ensuring a smoother user experience.

Form value clearing improvements:

  • Added a new buildClearedFormValues utility function to both BaseAcceptInvite.tsx and BaseInviteUser.tsx for mapping form field refs to empty strings, used to clear controlled input values during flow transitions. [1] [2]
  • Updated step transition logic in BaseAcceptInvite.tsx and BaseInviteUser.tsx to use buildClearedFormValues instead of resetting form values to empty objects, ensuring controlled inputs remain controlled. [1] [2] [3]

@asgardeo-github-bot
Copy link

🦋 Changeset detected

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

@thiva-k thiva-k closed this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants