@teamnhz/rn-ui-toolkit 1.4.5 → 1.4.7
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.
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ScrollViewProps } from "react-native";
|
|
3
3
|
import type { KeyboardAwareProps } from "react-native-keyboard-aware-scroll-view";
|
|
4
|
-
type KeyboardScrollProps = KeyboardAwareProps & ScrollViewProps;
|
|
5
4
|
/**
|
|
6
5
|
* FULLY EXTENDED COMPONENT
|
|
7
6
|
* - Supports ALL props of KeyboardAwareScrollView
|
|
8
7
|
* - No conflict props
|
|
9
8
|
* - Clean + reusable wrapper
|
|
10
9
|
*/
|
|
11
|
-
declare const KeyboardScroll:
|
|
10
|
+
declare const KeyboardScroll: React.ForwardRefExoticComponent<KeyboardAwareProps & ScrollViewProps & React.RefAttributes<any>>;
|
|
12
11
|
export default KeyboardScroll;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
2
|
import { KeyboardAwareScrollView, } from "react-native-keyboard-aware-scroll-view";
|
|
3
3
|
/**
|
|
4
4
|
* FULLY EXTENDED COMPONENT
|
|
@@ -6,7 +6,7 @@ import { KeyboardAwareScrollView, } from "react-native-keyboard-aware-scroll-vie
|
|
|
6
6
|
* - No conflict props
|
|
7
7
|
* - Clean + reusable wrapper
|
|
8
8
|
*/
|
|
9
|
-
const KeyboardScroll = (
|
|
10
|
-
return (React.createElement(KeyboardAwareScrollView, {
|
|
11
|
-
};
|
|
9
|
+
const KeyboardScroll = forwardRef((props, ref) => {
|
|
10
|
+
return (React.createElement(KeyboardAwareScrollView, { ref: ref, enableOnAndroid: true, enableAutomaticScroll: true, extraScrollHeight: 120, extraHeight: 120, keyboardOpeningTime: 0, keyboardShouldPersistTaps: "handled", showsVerticalScrollIndicator: false, bounces: false, ...props }, props.children));
|
|
11
|
+
});
|
|
12
12
|
export default KeyboardScroll;
|