@@ -36,6 +36,7 @@ import {
3636
3737import KeyboardManager , { PreviousNextView } from 'react-native-keyboard-manager'
3838
39+ /* Default values */
3940KeyboardManager . setEnable ( true ) ;
4041KeyboardManager . setEnableDebugging ( false ) ;
4142KeyboardManager . 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 ) ;
0 commit comments