Skip to content
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

[MPDX-7832] Fix form errors not displaying #855

Merged
merged 1 commit into from
Jan 30, 2024
Merged

Conversation

canac
Copy link
Contributor

@canac canac commented Jan 12, 2024

Description

For Formik touched to be populated, we have to call handleBlur in our blur event handler. Field errors weren't being displayed before because touched was always false.

Also improved the type-safety of forms by inferring the type of attributes from the schema vs explicitly telling yup what the type is (which could be inaccurate).

https://jira.cru.org/browse/MPDX-7832

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels. (Add the label "On Staging" to get the branch automatically merged into staging.)
  • I have requested a review from another person on the project

@canac canac added the On Staging Will be merged to the staging branch by Github Actions label Jan 12, 2024
@canac canac requested review from caleballdrin and dr-bizz January 12, 2024 21:29
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-855.d3dytjb8adxkk5.amplifyapp.com

Copy link
Contributor

@dr-bizz dr-bizz left a comment

Choose a reason for hiding this comment

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

Looks great! I like the onBlur feature. I wonder if we should create our own TextField Component which adds all these defaults like onBlur if they have an error. But that might take too much time for little gain

@canac canac force-pushed the 7832-touched-form-errors branch from d50781b to 6b2be6f Compare January 16, 2024 22:27
@canac canac removed the On Staging Will be merged to the staging branch by Github Actions label Jan 30, 2024
@canac canac force-pushed the 7832-touched-form-errors branch from 1e31d06 to b5bc837 Compare January 30, 2024 20:38
@canac canac enabled auto-merge January 30, 2024 20:44
@canac canac merged commit c8101aa into main Jan 30, 2024
18 checks passed
@canac canac deleted the 7832-touched-form-errors branch January 30, 2024 20:46
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