From 69fa7af9a9a5c57cc3c90c8b76fe34df66f027c1 Mon Sep 17 00:00:00 2001 From: Gidi Meir Morris Date: Thu, 3 Dec 2020 17:17:03 +0000 Subject: [PATCH] made default params optional --- .../sections/action_connector_form/action_form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx index 4a3905a93ac55..0337f6879e24a 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/sections/action_connector_form/action_form.tsx @@ -58,7 +58,7 @@ export interface ActionAccordionFormProps { setHasActionsDisabled?: (value: boolean) => void; setHasActionsWithBrokenConnector?: (value: boolean) => void; actionTypeRegistry: ActionTypeRegistryContract; - getDefaultActionParams: DefaultActionParamsGetter; + getDefaultActionParams?: DefaultActionParamsGetter; } interface ActiveActionConnectorState { @@ -344,7 +344,7 @@ export const ActionForm = ({ messageVariables={messageVariables} actionGroups={actionGroups} defaultActionMessage={defaultActionMessage} - defaultParams={getDefaultActionParams(actionItem.actionTypeId, actionItem.group)} + defaultParams={getDefaultActionParams?.(actionItem.actionTypeId, actionItem.group)} setActionGroupIdByIndex={setActionGroupIdByIndex} onAddConnector={() => { setActiveActionItem({ actionTypeId: actionItem.actionTypeId, index });