mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Merge main back to develop (#9864)
* fix : form csa for onsubmit not getting triggered (#9862) * Bump version to v2.50.0 (#9863) --------- Co-authored-by: Kiran Ashok <stepinfwd@gmail.com>
This commit is contained in:
parent
879201fb1f
commit
f2ed28f6d9
4 changed files with 13 additions and 16 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
|||
2.45.0
|
||||
2.50.0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.45.0
|
||||
2.50.0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}, []);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
2.45.0
|
||||
2.50.0
|
||||
|
|
|
|||
Loading…
Reference in a new issue