@jobber/components-native 0.95.1 → 0.95.2-JOB-141866-cab4e3f.3
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 +16 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Form/Form.tsx +18 -2
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jobber/components-native",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.2-JOB-141866-cab4e3f.3+cab4e3feb",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "React Native implementation of Atlantis",
|
|
6
6
|
"repository": {
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"react-native-safe-area-context": "^5.4.0",
|
|
97
97
|
"react-native-svg": ">=12.0.0"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "cab4e3febe1c59269f69b54e3b442122ac0a3cde"
|
|
100
100
|
}
|
package/dist/src/Form/Form.js
CHANGED
|
@@ -92,8 +92,9 @@ function InternalForm({ children, onBeforeSubmit, onSubmit, onSubmitError, onSub
|
|
|
92
92
|
const handleOfflineSubmit = useOfflineHandler();
|
|
93
93
|
const keyboardProps = Platform.select({
|
|
94
94
|
ios: {
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
onKeyboardDidHide: handleKeyboardHide,
|
|
96
|
+
onKeyboardDidShow: handleKeyboardShow,
|
|
97
|
+
onKeyboardDidChangeFrame: handleKeyboardDidChangeFrame,
|
|
97
98
|
},
|
|
98
99
|
android: {
|
|
99
100
|
onKeyboardDidHide: handleKeyboardHide,
|
|
@@ -125,6 +126,19 @@ function InternalForm({ children, onBeforeSubmit, onSubmit, onSubmitError, onSub
|
|
|
125
126
|
React.createElement(View, { style: styles.safeArea, ref: bottomViewRef })))),
|
|
126
127
|
React.createElement(FormMessage, null)));
|
|
127
128
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
129
|
+
function handleKeyboardDidChangeFrame(frames) {
|
|
130
|
+
if (frames &&
|
|
131
|
+
"endCoordinates" in frames &&
|
|
132
|
+
"height" in frames.endCoordinates &&
|
|
133
|
+
typeof frames.endCoordinates.height === "number" &&
|
|
134
|
+
frames.endCoordinates.height > keyboardHeight) {
|
|
135
|
+
handleKeyboardShow(frames);
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
handleKeyboardHide();
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
128
142
|
function handleKeyboardShow(frames) {
|
|
129
143
|
setKeyboardScreenY(frames.endCoordinates.screenY);
|
|
130
144
|
setKeyboardHeight(frames.endCoordinates.height);
|