From d99c61fd730c8a94c2828a86e4f34ebae8a50a53 Mon Sep 17 00:00:00 2001 From: chris <kokosias@yahoo.gr> Date: Wed, 26 Jun 2024 14:34:40 +0300 Subject: [PATCH] dont reset app on remount --- wax-prosemirror-core/src/Wax.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/wax-prosemirror-core/src/Wax.js b/wax-prosemirror-core/src/Wax.js index 6a470b54f..a1e7c32f4 100644 --- a/wax-prosemirror-core/src/Wax.js +++ b/wax-prosemirror-core/src/Wax.js @@ -63,17 +63,13 @@ const Wax = forwardRef((props, innerViewRef) => { const [application, setApplication] = useState(); const configHash = createConfigWithHash(config); - useEffect(() => { - return () => application?.resetApp(); - }, []); - useEffect(() => { const newApplication = createApplication(props); WaxLayout = setupLayout(newApplication, layout); setApplication(newApplication); return () => { - newApplication.resetApp(); - WaxLayout = null; + // newApplication.resetApp(); + // WaxLayout = null; }; }, [configHash]); -- GitLab