fix: [Plugin Action Editor] Avoid multiple init of Form Eval (#37780)

## Description

Noticed that we are causing the evaluation of the form twice because
`changeQuery` also initiates the eval. Since the `changeQuery` also
handles other aspects, will defer to that and not initiate again for UQI
Forms.

Fixes #37772

## Automation

/ok-to-test tags="@tag.Sanity"

### 🔍 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/12062575061>
> Commit: f531f842f5eeb4d77ccce034466cab6d1fe169a6
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12062575061&attempt=1"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.Sanity`
> Spec:
> <hr>Thu, 28 Nov 2024 05:14:17 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

- **Bug Fixes**
- Removed the `useInitFormEvaluation` hook from the `UQIEditorForm`,
streamlining the form initialization process.
- Updated the `useChangeActionCall` hook to directly access the
`action.id`, enhancing reliability in action dispatching.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Hetu Nandu 2024-11-28 10:49:17 +05:30 committed by GitHub
parent 591b25dd22
commit 0f3593af24
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 1 additions and 25 deletions

View File

@ -6,7 +6,6 @@ import { reduxForm } from "redux-form";
import { Flex } from "@appsmith/ads";
import { useGoogleSheetsSetDefaultProperty } from "./hooks/useGoogleSheetsSetDefaultProperty";
import { useFormData } from "./hooks/useFormData";
import { useInitFormEvaluation } from "./hooks/useInitFormEvaluation";
const UQIEditorForm = () => {
const {
@ -14,8 +13,6 @@ const UQIEditorForm = () => {
plugin: { uiComponent },
} = usePluginActionContext();
useInitFormEvaluation();
// Set default values for Google Sheets
useGoogleSheetsSetDefaultProperty();

View File

@ -1,21 +0,0 @@
import { useEffect } from "react";
import { initFormEvaluations } from "actions/evaluationActions";
import { useDispatch } from "react-redux";
import { usePluginActionContext } from "../../../../../PluginActionContext";
export const useInitFormEvaluation = () => {
const dispatch = useDispatch();
const {
action: { baseId },
editorConfig,
settingsConfig,
} = usePluginActionContext();
useEffect(
function formEvaluationInit() {
dispatch(initFormEvaluations(editorConfig, settingsConfig, baseId));
},
[baseId, dispatch, editorConfig, settingsConfig],
);
};

View File

@ -15,7 +15,7 @@ export const useChangeActionCall = () => {
switch (plugin?.type) {
case PluginType.API:
dispatch(changeApi(action?.id, false));
dispatch(changeApi(action.id, false));
break;
default:
dispatch(