PromucFlow_constructor/app/client/src
Ashit Rath 188af0df78 perf: JSONForm infinite re-rendering when field validation is set (#35994)
## Description
The setError function updates the state and the effect is also dependant
on the state which triggers re-render. This is a classic case of
re-rendering due to self state dependency and is fixed with a check if
the error is present for a particular field then it doesn't need to set
again

Fixes https://github.com/appsmithorg/appsmith/issues/35995

## 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/10627924838>
> Commit: 1d5dec675abd788931aab462832455fbce250df3
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10627924838&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.JSONForm`
> Spec:
> <hr>Fri, 30 Aug 2024 06:50:40 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**
- Enhanced error handling logic in the form validation process to
improve efficiency and correctness.
  
- **Tests**
- Added a new test case to validate the behavior of the form validation
hook when encountering invalid field states.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-08-30 17:53:04 +05:30
..
actions chore: Cleanup Redux Actions file (#35720) 2024-08-22 09:49:30 +05:30
api chore: Cleanup Redux Actions file (#35720) 2024-08-22 09:49:30 +05:30
assets chore: Remove google fonts imported from googleapis (#35392) 2024-08-07 08:49:04 +05:30
ce chore: Revert "fix: Add mode property to forkApplicationSaga" (#35873) 2024-08-26 16:30:00 +08:00
components Revert "feat: Action redesign: Updating Mongo plugin form config" (#35903) 2024-08-27 15:48:46 +05:30
constants chore: use ads icons (#35633) 2024-08-16 17:23:57 +03:00
ee chore: rename old ADS package (#35517) 2024-08-08 15:55:00 +03:00
enterprise fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
entities chore: Cleanup Redux Actions file (#35720) 2024-08-22 09:49:30 +05:30
globalStyles fix: Sync EE items into CE (#34373) 2024-06-24 09:36:38 +00:00
icons chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
IDE chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
layoutSystems chore: move anvil widgets to wds (#35812) 2024-08-22 20:18:20 +02:00
mockComponentProps
mockResponses
mocks fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
navigation fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
pages Revert "feat: Action redesign: Updating Mongo plugin form config" (#35903) 2024-08-27 15:48:46 +05:30
plugins/Linting fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
polyfills chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
reducers chore: Revert "fix: Add mode property to forkApplicationSaga" (#35873) 2024-08-26 16:30:00 +08:00
reflow chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
sagas chore: Cleanup Redux Actions file (#35720) 2024-08-22 09:49:30 +05:30
selectors chore: Input morphing (#35845) 2024-08-27 12:15:45 +05:30
templates
theme
transformers fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
UITelemetry chore: filter smartlook urls from tracing assets in page load instrumentation (#35738) 2024-08-19 11:39:39 +05:30
usagePulse fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
utils chore: Cleanup Redux Actions file (#35720) 2024-08-22 09:49:30 +05:30
WidgetProvider chore: Input morphing (#35845) 2024-08-27 12:15:45 +05:30
WidgetQueryGenerators chore: enable no-explicit-any rule (#35321) 2024-07-31 18:41:28 +03:00
widgets perf: JSONForm infinite re-rendering when field validation is set (#35994) 2024-08-30 17:53:04 +05:30
workers fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
App.css
AppErrorBoundry.tsx chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
config.d.ts fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
Globals.d.ts fix: Sync EE items into CE (#34373) 2024-06-24 09:36:38 +00:00
index.css chore: Remove google fonts imported from googleapis (#35392) 2024-08-07 08:49:04 +05:30
index.tsx chore: rename ADS package (#35583) 2024-08-09 17:20:29 +03:00
LandingScreen.tsx fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
preload-route-chunks.ts fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
react-app-env.d.ts
RouteChangeListener.tsx
serviceWorker.ts chore: Remove some logs and errors from console - 1/n (#35674) 2024-08-18 14:48:08 +05:30
store.ts fix: change appsmith alias (#35349) 2024-08-06 17:52:22 +03:00
wdyr.ts