Skip to content

Commit

Permalink
Merge main back to develop (#9864)
Browse files Browse the repository at this point in the history
* fix : form csa for onsubmit not getting triggered (#9862)

* Bump version to v2.50.0 (#9863)

---------

Co-authored-by: Kiran Ashok <stepinfwd@gmail.com>
  • Loading branch information
sherfin94 and stepinfwd committed May 24, 2024
1 parent 879201f commit f2ed28f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.45.0
2.50.0
2 changes: 1 addition & 1 deletion frontend/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.45.0
2.50.0
23 changes: 10 additions & 13 deletions frontend/src/Editor/Components/Form/Form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,19 +66,16 @@ export const Form = function Form(props) {
const mounted = useMounted();

useEffect(() => {
const exposedVariables = {
resetForm: async function () {
resetComponent();
},
submitForm: async function () {
if (isValid) {
onEvent('onSubmit', formEvents).then(() => resetComponent());
} else {
fireEvent('onInvalid');
}
},
};
setExposedVariables(exposedVariables);
setExposedVariable('resetForm', async function () {
resetComponent();
});
setExposedVariable('submitForm', async function () {
if (isValid) {
onEvent('onSubmit', formEvents).then(() => resetComponent());
} else {
fireEvent('onInvalid');
}
});

// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Expand Down
2 changes: 1 addition & 1 deletion server/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.45.0
2.50.0

0 comments on commit f2ed28f

Please sign in to comment.