## Description During on page load for a jsonForm widget, the `clearErrors` method was getting called even if there wasn't any error to clear. This led to significant number of this function execution for a large scale application For more info - https://theappsmith.slack.com/archives/C024GUDM0LT/p1723206363693759 Fixes https://github.com/appsmithorg/appsmith/issues/35739 ## Automation /ok-to-test tags="@tag.JSONForm" ### 🔍 Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10440802784> > Commit: 8f449b75c15bd57a65ca75c5b7cffc7417f645c5 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10440802784&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.JSONForm` > Spec: > <hr>Sun, 18 Aug 2024 13:21:29 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [ ] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved error handling in form validation to ensure errors are cleared only when necessary. - **Bug Fixes** - Enhanced logic for retrieving current error states to provide a more robust user experience when filling out forms. - **Tests** - Expanded test coverage for form validation logic, including various scenarios to ensure correct behavior under different conditions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|---|---|---|
| .. | ||
| component | ||
| constants | ||
| fields | ||
| widget | ||
| constants.ts | ||
| FormContext.tsx | ||
| helper.test.ts | ||
| helper.ts | ||
| icon.svg | ||
| index.ts | ||
| schemaParser.test.ts | ||
| schemaParser.ts | ||
| schemaTestData.ts | ||
| thumbnail.svg | ||