From 47ddfb639eb7b0113587817e326ad6d26005709c Mon Sep 17 00:00:00 2001 From: Waleed Date: Mon, 27 Oct 2025 14:28:29 -0700 Subject: [PATCH] fix(dropdown): auto-add character to trigger tag dropdown on connection tag drop in agent tools (#1742) --- .../components/sub-block/components/short-input.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/short-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/short-input.tsx index 739b04ddfa..8bfff6ede4 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/short-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/short-input.tsx @@ -287,7 +287,13 @@ export function ShortInput({ // Update all state in a single batch Promise.resolve().then(() => { - setStoreValue(newValue) + // Update value through onChange if provided, otherwise use store + if (onChange) { + onChange(newValue) + } else if (!isPreview) { + setStoreValue(newValue) + } + setCursorPosition(dropPosition + 1) setShowTags(true)