PromucFlow_constructor/app/client/src/widgets/JSONFormWidget
Ashit Rath 31760057ce
perf: JSONForm widget optimise calling of clear errors (#35717)
## 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 -->
2024-08-19 09:50:10 +05:30
..
component chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
constants feat: JSON form widget one click binding integration (#25873) 2023-10-03 13:40:51 +05:30
fields perf: JSONForm widget optimise calling of clear errors (#35717) 2024-08-19 09:50:10 +05:30
widget chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
constants.ts chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
FormContext.tsx chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
helper.test.ts
helper.ts chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
icon.svg feat: update explorer widget icons (#34018) 2024-06-12 10:44:22 +01:00
index.ts chore: Move the widget config to widget class (#26073) 2023-09-06 17:45:04 +05:30
schemaParser.test.ts chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
schemaParser.ts chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
schemaTestData.ts chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
thumbnail.svg feat: enhanced widget card (#32211) 2024-04-09 02:16:46 +01:00