From be360312d471b5bc76984d20f33a36f6a1bbc631 Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sun, 27 Aug 2023 19:30:37 +0300 Subject: [PATCH] Fix consistuenta submition --- .../frontend/src/pages/RSFormPage/EditorConstituenta.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx index 9a9e2427..abb37287 100644 --- a/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx +++ b/rsconcept/frontend/src/pages/RSFormPage/EditorConstituenta.tsx @@ -75,8 +75,10 @@ function EditorConstituenta({ activeID, onShowAST, onCreateCst, onRenameCst, onO } }, [activeCst, onOpenEdit, schema]); - function handleSubmit(event: React.FormEvent) { - event.preventDefault(); + function handleSubmit(event?: React.FormEvent) { + if (event) { + event.preventDefault(); + } if (!activeID || processing) { return; } @@ -135,6 +137,7 @@ function EditorConstituenta({ activeID, onShowAST, onCreateCst, onRenameCst, onO tooltip='Сохранить изменения' disabled={!isModified || !isEnabled} icon={} + onClick={() => handleSubmit()} >