diff --git a/web/src/pages/ConfigEditor.tsx b/web/src/pages/ConfigEditor.tsx index ea89d32fb..55df04e34 100644 --- a/web/src/pages/ConfigEditor.tsx +++ b/web/src/pages/ConfigEditor.tsx @@ -29,7 +29,7 @@ function ConfigEditor() { const [error, setError] = useState(); const editorRef = useRef(null); - const modelRef = useRef(null); + const modelRef = useRef(null); const configRef = useRef(null); const onHandleSaveConfig = useCallback( @@ -124,6 +124,12 @@ function ConfigEditor() { }; }); + useEffect(() => { + if (config && modelRef.current) { + modelRef.current.setValue(config); + } + }, [config]); + if (!config) { return ; }