diff --git a/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx b/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx index 43633cecdeb..1a4556cea66 100644 --- a/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx +++ b/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx @@ -2,6 +2,7 @@ import {DEFAULT_SCHEMA} from '@/components/JsonSchemaBuilder/utils/constants'; import {SchemaRecordType} from '@/components/JsonSchemaBuilder/utils/types'; import RequiredMark from '@/components/RequiredMark'; import {Label} from '@/components/ui/label'; +import {Skeleton} from '@/components/ui/skeleton'; import {Tooltip, TooltipContent, TooltipTrigger} from '@/components/ui/tooltip'; import InputTypeSwitchButton from '@/pages/platform/workflow-editor/components/Properties/components/InputTypeSwitchButton'; import PropertyCodeEditor from '@/pages/platform/workflow-editor/components/Properties/components/PropertyCodeEditor/PropertyCodeEditor'; @@ -22,6 +23,7 @@ import deleteProperty from '@/pages/platform/workflow-editor/utils/deletePropert import getInputHTMLType from '@/pages/platform/workflow-editor/utils/getInputHTMLType'; import saveProperty from '@/pages/platform/workflow-editor/utils/saveProperty'; import {Option} from '@/shared/middleware/platform/configuration'; +import {useGetWorkflowNodeParameterDisplayConditionsQuery} from '@/shared/queries/platform/workflowNodeParameters.queries'; import {ArrayPropertyType, PropertyAllType} from '@/shared/types'; import {QuestionMarkCircledIcon} from '@radix-ui/react-icons'; import {TooltipPortal} from '@radix-ui/react-tooltip'; @@ -122,6 +124,15 @@ const Property = ({ const {showPropertyCodeEditorSheet, showPropertyJsonSchemaBuilder, showWorkflowCodeEditorSheet} = useWorkflowEditorStore(); + const {isFetching: isFetchingDisplayConditions} = useGetWorkflowNodeParameterDisplayConditionsQuery( + { + id: workflow.id!, + // eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain + workflowNodeName: currentNode?.workflowNodeName!, + }, + !!currentNode?.workflowNodeName + ); + const previousOperationName = usePrevious(currentNode?.operationName); const previousMentionInputValue = usePrevious(mentionInputValue); @@ -906,6 +917,16 @@ const Property = ({ return <>>; } + if (displayCondition && currentComponent?.displayConditions?.[displayCondition] && isFetchingDisplayConditions) { + return ( +