@jobber/components-native 0.95.1 → 0.95.2-JOB-141866-25e664c.2
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 +14 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/Form/Form.tsx +16 -0
package/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-25e664c.2+25e664cae",
|
|
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": "25e664cae80a08377432961d64dcc6062d467c55"
|
|
100
100
|
}
|
package/src/Form/Form.tsx
CHANGED
|
@@ -124,6 +124,7 @@ function InternalForm<T extends FieldValues, S>({
|
|
|
124
124
|
ios: {
|
|
125
125
|
onKeyboardWillHide: handleKeyboardHide,
|
|
126
126
|
onKeyboardWillShow: handleKeyboardShow,
|
|
127
|
+
onKeyboardWillChangeFrame: handleKeyboardWillChangeFrame,
|
|
127
128
|
},
|
|
128
129
|
android: {
|
|
129
130
|
onKeyboardDidHide: handleKeyboardHide,
|
|
@@ -229,6 +230,21 @@ function InternalForm<T extends FieldValues, S>({
|
|
|
229
230
|
</FormProvider>
|
|
230
231
|
);
|
|
231
232
|
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
234
|
+
function handleKeyboardWillChangeFrame(frames: Record<string, any>) {
|
|
235
|
+
if (
|
|
236
|
+
frames &&
|
|
237
|
+
"endCoordinates" in frames &&
|
|
238
|
+
"height" in frames.endCoordinates &&
|
|
239
|
+
typeof frames.endCoordinates.height === "number" &&
|
|
240
|
+
frames.endCoordinates.height > keyboardHeight
|
|
241
|
+
) {
|
|
242
|
+
handleKeyboardShow(frames);
|
|
243
|
+
} else {
|
|
244
|
+
handleKeyboardHide();
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
232
248
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
233
249
|
function handleKeyboardShow(frames: Record<string, any>) {
|
|
234
250
|
setKeyboardScreenY(frames.endCoordinates.screenY);
|