secullum-react-native-ui 4.15.2-beta.4 → 4.15.2-beta.6

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.
@@ -70,15 +70,16 @@ class KeyboardAvoidingView extends React.Component {
70
70
  this.keyboardDidHideSubscription.remove();
71
71
  }
72
72
  render() {
73
- const { refreshControl, scrollEnabled, onScroll, children, keyBoardShow } = this.props;
73
+ const { refreshControl, scrollEnabled, onScroll, children, keyBoardShow, extraWindowHeight } = this.props;
74
+ const { keyboardHeight } = this.state;
74
75
  // Android devices with notch will report less `availableHeight` than it should
75
76
  // That's because of this: https://github.com/facebook/react-native/issues/23693
76
77
  // If I change it to 'screen', Android devices with virtual buttons will report more than it should
77
- const availableHeight = react_native_1.Dimensions.get('window').height -
78
- this.state.keyboardHeight -
79
- this.props.extraWindowHeight;
80
- return (React.createElement(react_native_1.View, { style: [{ height: availableHeight }, !keyBoardShow && { flex: 1 }] },
81
- React.createElement(react_native_1.ScrollView, { ref: this.scrollViewRef,
78
+ const availableHeight = react_native_1.Dimensions.get('window').height - keyboardHeight - extraWindowHeight;
79
+ return (React.createElement(react_native_1.View, { style: !keyBoardShow && { flex: 1 } },
80
+ React.createElement(react_native_1.ScrollView, { contentContainerStyle: {
81
+ paddingBottom: keyboardHeight
82
+ }, ref: this.scrollViewRef,
82
83
  // @ts-ignore: O react-native não tem auto, mas o react-native-web aceita
83
84
  refreshControl: refreshControl, scrollEnabled: scrollEnabled, onScroll: (e) => {
84
85
  if (onScroll) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "secullum-react-native-ui",
3
- "version": "4.15.2-beta.4",
3
+ "version": "4.15.2-beta.6",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "files": [