Added Android compatibility to PreviousNextView export.

This commit is contained in:
Douglas Nassif Roma Junior
2017-10-04 13:23:47 -03:00
parent 4a9aec691b
commit 83f2e5908d
4 changed files with 9 additions and 8 deletions

View File

@@ -102,7 +102,7 @@ class SampleKeyboardManager extends Component {
self.setState(state)
}}
placeholder={ref}
blurOnSubmit={true /* 'false' causes a react-native bug */}
blurOnSubmit={!multiline /* 'false' causes a react-native bug */}
onSubmitEditing={nextFocus}
multiline={multiline}
numberOfLines={multiline ? 10 : 1}
@@ -121,7 +121,7 @@ class SampleKeyboardManager extends Component {
{/* To try with Modal, uncomment the two following lines. */}
{/* <Modal visible={true}> */}
<PreviousNextView style={{ flex: 1 }}>
{/* <PreviousNextView style={{ flex: 1 }}> */}
{/* ScrollView is not required, but may be needed in some cases. */}
<ScrollView>
@@ -139,7 +139,7 @@ class SampleKeyboardManager extends Component {
</ScrollView>
</PreviousNextView>
{/* </PreviousNextView> */}
{/* </Modal> */}
</View>

View File

@@ -3429,7 +3429,7 @@ react-devtools-core@^2.5.0:
ws "^2.0.3"
"react-native-keyboard-manager@file:..":
version "4.0.13-1"
version "4.0.13-3"
react-native@0.48.4:
version "0.48.4"

View File

@@ -23,10 +23,11 @@
*/
import {
NativeModules, DeviceEventEmitter, requireNativeComponent,
NativeModules, DeviceEventEmitter, requireNativeComponent, View, Platform,
} from 'react-native';
const { OS } = Platform;
export const PreviousNextView = OS === 'ios' ? requireNativeComponent('RNKMPreviousNextView') : View;
const KeyboardManager = NativeModules.ReactNativeKeyboardManager;
export default KeyboardManager;
export const PreviousNextView = requireNativeComponent('RNKMPreviousNextView');

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-keyboard-manager",
"version": "4.0.13-2",
"version": "4.0.13-3",
"description": "Library that allows to prevent issues of keyboard sliding up and cover on React-Native iOS projects. ⚛",
"private": false,
"repository": {