From 614948948332c4d4332cc32bd57a3f6100b00851 Mon Sep 17 00:00:00 2001 From: Vikhyath Mondreti Date: Thu, 10 Jul 2025 11:56:25 -0700 Subject: [PATCH] Update apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/code.tsx Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- .../workflow-block/components/sub-block/components/code.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/code.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/code.tsx index a5ca9bb3c1..fb70307ea4 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/code.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/components/sub-block/components/code.tsx @@ -106,7 +106,10 @@ export function Code({ useEffect(() => { if (onValidationChange && subBlockId === 'responseFormat') { - onValidationChange(isValidJson) + const timeoutId = setTimeout(() => { + onValidationChange(isValidJson) + }, 150) // Match debounce time from setStoreValue + return () => clearTimeout(timeoutId) } }, [isValidJson, onValidationChange, subBlockId])