Skip to content

fix Submit button behaves differently than enter key submission, at least for step validation #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

supra08
Copy link

@supra08 supra08 commented May 13, 2025

Important

Adds custom onSubmit handler in Form.tsx to ensure consistent form validation for button clicks and enter key submissions.

  • Behavior:
    • Adds custom onSubmit handler in Form.tsx to ensure form validation is consistent for button clicks and enter key submissions.
    • Prevents default form submission and stops event propagation in onSubmit.
  • Misc:
    • No changes to Form.displayName.

This description was created by Ellipsis for 530a17e. You can customize this summary. It will automatically update as commits are pushed.

Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

Looks good to me! 👍

Reviewed everything up to 530a17e in 1 minute and 2 seconds. Click for details.
  • Reviewed 40 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 draft comments. View those below.
  • Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. packages/formik/src/Form.tsx:25
  • Draft comment:
    Good use of useCallback to wrap onSubmit, ensuring consistent submission handling.
  • Reason this comment was not posted:
    Confidence changes required: 0% <= threshold 50% None
2. packages/formik/src/Form.tsx:27
  • Draft comment:
    Consider using optional chaining (e.g., e.preventDefault?.()) for cleaner checks.
  • Reason this comment was not posted:
    Confidence changes required: 33% <= threshold 50% None
3. packages/formik/src/Form.tsx:52
  • Draft comment:
    There is a missing newline at the end of the file. Please add a newline after line 52 to adhere to common coding style guidelines.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable: usefulness confidence = 10% vs. threshold = 50% While having a newline at the end of files is a common convention, this is typically handled automatically by IDE settings or pre-commit hooks. It's a very minor stylistic issue that doesn't affect functionality. Most modern development environments handle this automatically. This feels like noise in the PR review process. Missing newlines at end of files can cause issues with some tools and can make diffs less clean. Some would argue this is a valid style concern. While technically correct, this is too minor of an issue to warrant a PR comment. This should be handled by automation rather than manual review comments. Delete this comment as it's too minor of a stylistic issue to warrant manual intervention in the PR review process.

Workflow ID: wflow_jXg9RC1yHVZfBA1A

You can customize Ellipsis by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.

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.

1 participant