From fe1400235967f2ad0c1ffbc05d9e15bab370c664 Mon Sep 17 00:00:00 2001 From: "web@ppanel" Date: Mon, 29 Dec 2025 09:49:48 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Only=20update=20internalV?= =?UTF-8?q?alue=20in=20MonacoEditor=20if=20propValue=20has=20changed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/src/composed/editor/monaco-editor.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/composed/editor/monaco-editor.tsx b/packages/ui/src/composed/editor/monaco-editor.tsx index 9949cf2..b6ad761 100644 --- a/packages/ui/src/composed/editor/monaco-editor.tsx +++ b/packages/ui/src/composed/editor/monaco-editor.tsx @@ -60,7 +60,10 @@ export function MonacoEditor({ const size = useSize(ref); useEffect(() => { - setInternalValue(propValue); + // Only update internalValue if propValue has actually changed and is different from current value + if (propValue !== internalValue) { + setInternalValue(propValue); + } }, [propValue]); const debouncedOnChange = useRef(