From c7cca89622ebb5dba9faa515d98ea65585acb890 Mon Sep 17 00:00:00 2001 From: Miriam Shams-Rainey Date: Wed, 16 Nov 2022 01:09:59 -0500 Subject: [PATCH] Changed default Action to script from cloud func (#913) * Changed default Action to script from cloud func * Apply suggestions from code review Co-authored-by: Sidney Alcantara * Updated to use falsy undefined value Co-authored-by: Sidney Alcantara --- src/components/fields/Action/Settings.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/fields/Action/Settings.tsx b/src/components/fields/Action/Settings.tsx index 74e64aaa..9c2562a1 100644 --- a/src/components/fields/Action/Settings.tsx +++ b/src/components/fields/Action/Settings.tsx @@ -303,7 +303,7 @@ const Settings = ({ config, onChange, fieldName }: ISettingsProps) => { aria-label="Action will run" name="isActionScript" value={ - config.isActionScript ? "actionScript" : "cloudFunction" + config.isActionScript !== false ? "actionScript" : "cloudFunction" } onChange={(e) => onChange("isActionScript")( @@ -359,7 +359,7 @@ const Settings = ({ config, onChange, fieldName }: ISettingsProps) => { - {!config.isActionScript ? ( + {config.isActionScript === false ? ( { ), }, - config.isActionScript && + config.isActionScript !== false && get(config, "undo.enabled") && { id: "undo", title: "Undo action",