Skip to content

Commit

Permalink
prevent form double submits
Browse files Browse the repository at this point in the history
  • Loading branch information
mmadariaga committed Sep 12, 2023
1 parent 8937ef9 commit 53c7ef2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@irontec/ivoz-ui",
"version": "1.1.9",
"version": "1.1.10",
"description": "UI library used in ivozprovider",
"license": "GPL-3.0",
"main": "index.js",
Expand Down
8 changes: 7 additions & 1 deletion library/src/entities/DefaultEntityBehavior/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,13 @@ const Form: EntityFormType = (props) => {
return (
<div>
<form
onSubmit={formik.handleSubmit}
onSubmit={(e) => {
if (formik.isSubmitting) {
return false;
}

formik.handleSubmit(e);
}}
style={{ display: 'flex', flexDirection: 'column', gap: '40px' }}
>
{groups.map((group, idx: number) => {
Expand Down

0 comments on commit 53c7ef2

Please sign in to comment.