diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx b/app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx index db91b29b3a2..66ab320a304 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/PluginActionForm.tsx @@ -2,13 +2,18 @@ import React from "react"; import APIEditorForm from "./components/APIEditorForm"; import { Flex } from "@appsmith/ads"; import { useChangeActionCall } from "./hooks/useChangeActionCall"; +import { usePluginActionContext } from "../../PluginActionContext"; +import { UIComponentTypes } from "api/PluginApi"; const PluginActionForm = () => { useChangeActionCall(); + const { plugin } = usePluginActionContext(); return ( - + {plugin.uiComponent === UIComponentTypes.ApiEditorForm ? ( + + ) : null} ); }; diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/hooks/useGetFormActionValues.ts b/app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/hooks/useGetFormActionValues.ts index 1078d18282d..da75a1482a2 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/hooks/useGetFormActionValues.ts +++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/CommonEditorForm/hooks/useGetFormActionValues.ts @@ -18,7 +18,7 @@ function useGetFormActionValues() { // In an unlikely scenario where form is not initialised, // return empty values to avoid form ui issues - if (!isAPIAction(formValues)) { + if (!formValues || !isAPIAction(formValues)) { return { actionHeaders: [], actionParams: [], diff --git a/app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx b/app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx index f20a395d4cb..9359c8130f3 100644 --- a/app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx +++ b/app/client/src/PluginActionEditor/components/PluginActionResponse/PluginActionResponse.tsx @@ -57,7 +57,7 @@ function PluginActionResponse() { expandedHeight={`${ActionExecutionResizerHeight}px`} isCollapsed={!open} onSelect={updateSelectedResponseTab} - selectedTabKey={selectedTab || tabs[0].key} + selectedTabKey={selectedTab || tabs[0]?.key} tabs={tabs} />