Skip to content

Conversation

@jamesqquick
Copy link
Contributor

What/Why?

Don't reset login form data on a failed login attempt. This way the user doesn't have to enter their email address again from scratch,

Testing

Navigate to /login and attempt to login with invalid credentials. You should see an error message but the form data should be maintained.

CleanShot.2026-01-09.at.15.31.36.mp4

Migration

Added a call to event.preventDefault() in the onSubmission callback to ensure default resetting of form data doesn't not happen in the sign up form.

const [form, fields] = useForm({
  //...
  onSubmit(event, { formData }) {
    event.preventDefault();
    startTransition(() => {
      formAction(formData);
    });
  }
});

@jamesqquick jamesqquick requested a review from a team as a code owner January 9, 2026 21:32
@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: 6bfcd30

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

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

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

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
catalyst Ready Ready Preview, Comment Jan 9, 2026 9:32pm

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