Skip to content

Commit d3d903d

Browse files
committed
Updated Sample project
1 parent c7ebb02 commit d3d903d

File tree

7 files changed

+1558
-2288
lines changed

7 files changed

+1558
-2288
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
*.pbxproj -text
2-
ios/IQKeyboardManager/**/* linguist-vendored
3-
ios/IQKeyboardManager/ linguist-vendored
42
ios/IQKeyboardManager/* linguist-vendored
3+
Sample/* linguist-vendored

Sample/__tests__/index.android.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sample/__tests__/index.ios.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

Sample/index.ios.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import {
3636

3737
import KeyboardManager, { PreviousNextView } from 'react-native-keyboard-manager'
3838

39+
/* Default values */
3940
KeyboardManager.setEnable(true);
4041
KeyboardManager.setEnableDebugging(false);
4142
KeyboardManager.setKeyboardDistanceFromTextField(10);
@@ -103,8 +104,7 @@ class SampleKeyboardManager extends Component {
103104
self.setState(state)
104105
}}
105106
placeholder={ref}
106-
blurOnSubmit={!multiline /* 'false' causes a react-native bug */}
107-
onSubmitEditing={nextFocus}
107+
onSubmitEditing={!multiline ? nextFocus : undefined}
108108
multiline={multiline}
109109
numberOfLines={multiline ? 10 : 1}
110110
returnKeyType={multiline ? 'default' : 'next'}
@@ -122,25 +122,25 @@ class SampleKeyboardManager extends Component {
122122

123123
{/* To try with Modal, uncomment the two following lines. */}
124124
{/* <Modal visible={true}> */}
125-
{/* <PreviousNextView style={{ flex: 1 }}> */}
125+
{/* <PreviousNextView style={{ flex: 1 }}> */}
126126

127-
{/* ScrollView is not required, but may be needed in some cases. */}
128-
<ScrollView>
127+
{/* ScrollView is not required, but may be needed in some cases. */}
128+
<ScrollView>
129129

130-
<View style={{ alignItems: "center" }}>
131-
<Text style={{ marginTop: 50, textAlign: "center" }}>React-Native Keyboard Manager</Text>
132-
<View style={{ marginTop: 10, flexDirection: "row", alignItems: "center" }}>
133-
<Text>Enable/Disable </Text>
134-
<Switch onValueChange={this.onEnableDisable}
135-
value={this.state.enableDisable} />
136-
</View>
137-
</View>
130+
<View style={{ alignItems: "center" }}>
131+
<Text style={{ marginTop: 50, textAlign: "center" }}>React-Native Keyboard Manager</Text>
132+
<View style={{ marginTop: 10, flexDirection: "row", alignItems: "center" }}>
133+
<Text>Enable/Disable </Text>
134+
<Switch onValueChange={this.onEnableDisable}
135+
value={this.state.enableDisable} />
136+
</View>
137+
</View>
138138

139-
<View>{inputs}</View>
139+
<View>{inputs}</View>
140140

141-
</ScrollView>
141+
</ScrollView>
142142

143-
{/* </PreviousNextView> */}
143+
{/* </PreviousNextView> */}
144144
{/* </Modal> */}
145145

146146
</View>
@@ -149,4 +149,4 @@ class SampleKeyboardManager extends Component {
149149
}
150150

151151

152-
AppRegistry.registerComponent('SampleKeyboardManager', () => SampleKeyboardManager);
152+
AppRegistry.registerComponent('SampleKeyboardManager', () => SampleKeyboardManager);

Sample/package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@
77
"test": "jest"
88
},
99
"dependencies": {
10-
"react": "16.2.0",
11-
"react-native": "0.53.0",
10+
"react": "16.3.2",
11+
"react-native": "0.55.4",
1212
"react-native-keyboard-manager": "file:../"
1313
},
1414
"devDependencies": {
15-
"babel-jest": "22.2.0",
16-
"babel-preset-react-native": "4.0.0",
17-
"jest": "22.2.1",
18-
"react-test-renderer": "16.2.0"
19-
},
20-
"jest": {
21-
"preset": "react-native"
15+
"babel-preset-react-native": "4.0.0"
2216
}
23-
}
17+
}

0 commit comments

Comments
 (0)