From 73c23776a68b80d51ef22f08231308934b387534 Mon Sep 17 00:00:00 2001 From: Ivica Cardic Date: Sun, 1 Dec 2024 22:24:56 +0100 Subject: [PATCH] =?UTF-8?q?1674=20-=20client=20-=20Don=E2=80=99t=20show=20?= =?UTF-8?q?expression=20switch=20button=20if=20a=20switch=20is=20disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Properties/Property.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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 71b84096e0..7826a22c56 100644 --- a/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx +++ b/client/src/pages/platform/workflow-editor/components/Properties/Property.tsx @@ -131,6 +131,7 @@ const Property = ({ controlType, custom, description, + expressionEnabled, hidden, label, languageId, @@ -737,18 +738,20 @@ const Property = ({ setShowInputTypeSwitchButton(false); } - if (controlType === 'JSON_SCHEMA_BUILDER') { - setShowInputTypeSwitchButton(true); - } + if (expressionEnabled) { + if (controlType === 'JSON_SCHEMA_BUILDER') { + setShowInputTypeSwitchButton(true); + } - if (controlType === 'SELECT') { - setShowInputTypeSwitchButton(true); + if (controlType === 'SELECT') { + setShowInputTypeSwitchButton(true); + } } if (controlType === 'NULL') { setShowInputTypeSwitchButton(false); } - }, [controlType]); + }, [controlType, expressionEnabled]); // update propertyParameterValue when workflow definition changes useEffect(() => {