@jobber/components-native 0.75.3-POC-fixing-d44fac2.135 → 0.75.3-POC-fixing-d44fac2.136
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +2 -2
- package/dist/src/Form/Form.js +2 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Form/Form.tsx +6 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.75.3-POC-fixing-d44fac2.
|
|
3
|
+
"version": "0.75.3-POC-fixing-d44fac2.136+b57471fe",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -79,5 +79,5 @@
|
|
|
79
79
|
"react-native-safe-area-context": "^4.5.2",
|
|
80
80
|
"react-native-svg": ">=12.0.0"
|
|
81
81
|
},
|
|
82
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "b57471fec4113fb6fb2f3e0fb76273ad024896d9"
|
|
83
83
|
}
|
package/src/Form/Form.tsx
CHANGED
|
@@ -249,13 +249,13 @@ function InternalForm<T extends FieldValues, S>({
|
|
|
249
249
|
let result: S;
|
|
250
250
|
|
|
251
251
|
handleSubmit(data => {
|
|
252
|
-
internalSubmit(data).then(saveResult => {
|
|
252
|
+
return internalSubmit(data).then(saveResult => {
|
|
253
253
|
result = saveResult as S;
|
|
254
|
-
})
|
|
254
|
+
});
|
|
255
255
|
})().then(() => {
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
256
|
+
removeListenerRef.current?.();
|
|
257
|
+
onSubmitSuccess(result);
|
|
258
|
+
});
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
async function internalSubmit(data: FormValues<T>) {
|
|
@@ -268,8 +268,7 @@ function InternalForm<T extends FieldValues, S>({
|
|
|
268
268
|
if (performSubmit) {
|
|
269
269
|
Keyboard.dismiss();
|
|
270
270
|
|
|
271
|
-
return onSubmit(data)
|
|
272
|
-
.catch(handleSubmitCatch);
|
|
271
|
+
return onSubmit(data).catch(handleSubmitCatch);
|
|
273
272
|
}
|
|
274
273
|
}
|
|
275
274
|
|