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()} >