react-native-keyboard-spacer
Advanced tools
Comparing version 0.1.5 to 0.1.6
@@ -62,6 +62,8 @@ /** | ||
return; | ||
var keyboardSpace = frames.endCoordinates.height + ('topSpacing' in this.props ? this.props.topSpacing : 0); | ||
this.setState({ | ||
keyboardSpace: frames.endCoordinates.height + ('topSpacing' in this.props ? this.props.topSpacing : 0), | ||
keyboardSpace: keyboardSpace, | ||
isKeyboardOpened: true | ||
}, () => ('onToggle' in this.props ? this.props.onToggle(true) : null)); | ||
}, () => ('onToggle' in this.props ? this.props.onToggle(true, keyboardSpace) : null)); | ||
} | ||
@@ -73,3 +75,3 @@ | ||
isKeyboardOpened: false | ||
}, () => ('onToggle' in this.props ? this.props.onToggle(false) : null)); | ||
}, () => ('onToggle' in this.props ? this.props.onToggle(false, 0) : null)); | ||
} | ||
@@ -76,0 +78,0 @@ |
{ | ||
"name": "react-native-keyboard-spacer", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "Plug and play react-Native keyboard spacer view.", | ||
@@ -5,0 +5,0 @@ "main": "KeyboardSpacer.js", |
@@ -58,2 +58,2 @@ [![NPM](https://nodei.co/npm-dl/react-native-keyboard-spacer.png?months=3&height=2)](https://nodei.co/npm/react-native-keyboard-spacer/) | ||
| :------------ |:---------------:| :---------------:| :-----| | ||
| onToggle | `toggleState` | `function` | onToggle method is called when when keyboard toggles. Returns true or false | | ||
| onToggle | `toggleState` | `function` | onToggle method is called when when keyboard toggles. Two parameters passed through, keyboardState (boolean, true if keyboard shown) and keyboardSpace (height occupied by keyboard) | |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6846
90