diff --git a/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx b/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx index e0fa04202..a09df5931 100644 --- a/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx +++ b/apps/client/src/features/app-settings/panel/automations-panel/AutomationForm.tsx @@ -380,13 +380,13 @@ export default function AutomationForm(props: AutomationFormProps) { {rowErrors?.address?.message} diff --git a/apps/client/src/features/app-settings/panel/automations-panel/template-input/TemplateInput.tsx b/apps/client/src/features/app-settings/panel/automations-panel/template-input/TemplateInput.tsx index a55dc1c23..6c6148856 100644 --- a/apps/client/src/features/app-settings/panel/automations-panel/template-input/TemplateInput.tsx +++ b/apps/client/src/features/app-settings/panel/automations-panel/template-input/TemplateInput.tsx @@ -33,13 +33,11 @@ const TemplateInput = forwardRef(function TemplateInput(props: TemplateInputProp if (event.target.value.endsWith('{')) { setShowSuggestions(true); + setSuggestions(updateSuggestions(event.target.value)); } else if (event.target.value === '' || event.target.value.endsWith('}}')) { setShowSuggestions(false); - } - - if (showSuggestions) { - const suggestions = updateSuggestions(event.target.value); - setSuggestions(suggestions); + } else if (showSuggestions) { + setSuggestions(updateSuggestions(event.target.value)); } onChange?.(event); @@ -55,7 +53,7 @@ const TemplateInput = forwardRef(function TemplateInput(props: TemplateInputProp return (
- + {showSuggestions && suggestions.length > 0 && (