From 9422eaed7e0f51e6ada4b26f0a83ad2c9a21cbdd Mon Sep 17 00:00:00 2001 From: Lars Hampe Date: Sun, 10 Nov 2024 07:26:20 +0100 Subject: [PATCH] feat(app): reset form on load --- apps/app/src/routes/changelog.$id.version.$versionId.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/app/src/routes/changelog.$id.version.$versionId.tsx b/apps/app/src/routes/changelog.$id.version.$versionId.tsx index 8113054..fc484bd 100644 --- a/apps/app/src/routes/changelog.$id.version.$versionId.tsx +++ b/apps/app/src/routes/changelog.$id.version.$versionId.tsx @@ -76,8 +76,9 @@ const Component = () => { useEffect(() => { if (data) { mdxEditorRef.current?.setMarkdown(data.markdown) + form.reset(data) } - }, [data]) + }, [data, form]) if (error) { return (