From 7fbbc7ba7acfe5a97203a446ff941f1cce2389e6 Mon Sep 17 00:00:00 2001 From: Waleed Date: Fri, 13 Feb 2026 00:18:25 -0800 Subject: [PATCH] fix(tool-input): sync cleared subblock values to tool params (#3214) --- .../tool-input/components/tools/sub-block-renderer.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/sub-block-renderer.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/sub-block-renderer.tsx index 0f9319ace..81ca1f03c 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/sub-block-renderer.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/sub-block-renderer.tsx @@ -78,8 +78,13 @@ export function ToolSubBlockRenderer({ }, [toolParamValue, setStoreValue, isObjectType]) useEffect(() => { - if (storeValue == null) return - const stringValue = typeof storeValue === 'string' ? storeValue : JSON.stringify(storeValue) + if (storeValue == null && lastPushedToParamsRef.current === null) return + const stringValue = + storeValue == null + ? '' + : typeof storeValue === 'string' + ? storeValue + : JSON.stringify(storeValue) if (stringValue !== lastPushedToParamsRef.current) { lastPushedToParamsRef.current = stringValue lastPushedToStoreRef.current = stringValue