aws-amplify / amplify-codegen-ui

Generate React components for use in an AWS Amplify project.
Apache License 2.0
32 stars 26 forks source link

fix: clear form field errors on cancel #1157

Open jacoblogan opened 7 months ago

jacoblogan commented 7 months ago

Problem

Required field error not being cleared when cancelling input

Solution

On cancel clear form field errors

Additional Notes

Links

Ticket

GitHub issue:

Other links

Verification

Manual tests

Automated tests

Housekeeping

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.86%. Comparing base (70799cb) to head (acf92ac).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157/graphs/tree.svg?width=650&height=150&src=pr&token=opw1LYK6Jn&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify)](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify) ```diff @@ Coverage Diff @@ ## main #1157 +/- ## ======================================= Coverage 93.86% 93.86% ======================================= Files 150 150 Lines 6114 6114 Branches 1838 1838 ======================================= Hits 5739 5739 Misses 357 357 Partials 18 18 ``` | [Files](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify) | Coverage Δ | | |---|---|---| | [...-ui-react/lib/utils/forms/array-field-component.ts](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify#diff-cGFja2FnZXMvY29kZWdlbi11aS1yZWFjdC9saWIvdXRpbHMvZm9ybXMvYXJyYXktZmllbGQtY29tcG9uZW50LnRz) | `100.00% <ø> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify). Last update [70799cb...acf92ac](https://app.codecov.io/gh/aws-amplify/amplify-codegen-ui/pull/1157?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aws-amplify).