@jobber/components-native 0.95.2 → 0.95.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 +4 -1
- package/dist/src/Form/components/IOSKeyboardAwareScrollViewSpacer/IOSKeyboardAwareScrollViewSpacer.js +12 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/src/Form/components/IOSKeyboardAwareScrollViewSpacer/IOSKeyboardAwareScrollViewSpacer.d.ts +6 -0
- package/package.json +2 -2
- package/src/Form/Form.tsx +4 -0
- package/src/Form/components/IOSKeyboardAwareScrollViewSpacer/IOSKeyboardAwareScrollViewSpacer.tsx +14 -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.3",
|
|
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": "d082bc71718efe42e118b1f3adcd9007bb1923cb"
|
|
100
100
|
}
|
package/src/Form/Form.tsx
CHANGED
|
@@ -27,6 +27,7 @@ import { FormSaveButton } from "./components/FormSaveButton";
|
|
|
27
27
|
import { useSaveButtonPosition } from "./hooks/useSaveButtonPosition";
|
|
28
28
|
import { FormCache } from "./components/FormCache/FormCache";
|
|
29
29
|
import { useAtlantisFormContext } from "./context/AtlantisFormContext";
|
|
30
|
+
import { IOSKeyboardAwareScrollViewSpacer } from "./components/IOSKeyboardAwareScrollViewSpacer/IOSKeyboardAwareScrollViewSpacer";
|
|
30
31
|
import { InputAccessoriesProvider } from "../InputText";
|
|
31
32
|
import { tokens } from "../utils/design";
|
|
32
33
|
import { ErrorMessageProvider } from "../ErrorMessageWrapper";
|
|
@@ -216,6 +217,9 @@ function InternalForm<T extends FieldValues, S>({
|
|
|
216
217
|
onCloseBottomSheet={() => setIsBottomSheetOpen(false)}
|
|
217
218
|
/>
|
|
218
219
|
)}
|
|
220
|
+
{disableKeyboardAwareScroll && (
|
|
221
|
+
<IOSKeyboardAwareScrollViewSpacer />
|
|
222
|
+
)}
|
|
219
223
|
</View>
|
|
220
224
|
)}
|
|
221
225
|
{renderFooter}
|
package/src/Form/components/IOSKeyboardAwareScrollViewSpacer/IOSKeyboardAwareScrollViewSpacer.tsx
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Platform, View } from "react-native";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* This is a spacer to help prevent issues with the KeyboardAwareScrollView on iOS.
|
|
6
|
+
* This will be removed as a part of JOB-147156
|
|
7
|
+
*/
|
|
8
|
+
export function IOSKeyboardAwareScrollViewSpacer() {
|
|
9
|
+
if (Platform.OS === "ios") {
|
|
10
|
+
return <View style={{ height: 400 }} />;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
return null;
|
|
14
|
+
}
|