File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,17 @@ class InputSpinner extends Component {
221221 this . onChange ( num ) ;
222222 }
223223
224+ /**
225+ * On Submit keyboard
226+ * @param NativeEvent
227+ * @returns {* }
228+ */
229+
230+ onSubmit ( e ) {
231+ this . props . onSubmit ( this . parseNum ( e . nativeEvent . text ) )
232+ }
233+
234+
224235 /**
225236 * Max is reached
226237 * @param num
@@ -649,6 +660,7 @@ class InputSpinner extends Component {
649660 editable = { this . isEditable ( ) }
650661 keyboardType = { this . _getKeyboardType ( ) }
651662 onChangeText = { this . onChange . bind ( this ) }
663+ onSubmitEditing = { this . onSubmit . bind ( this ) }
652664 />
653665
654666 { this . props . children }
@@ -693,6 +705,7 @@ InputSpinner.propTypes = {
693705 onMax : PropTypes . func ,
694706 onIncrease : PropTypes . func ,
695707 onDecrease : PropTypes . func ,
708+ onSubmit : PropTypes . func ,
696709 buttonLeftDisabled : PropTypes . bool ,
697710 buttonRightDisabled : PropTypes . bool ,
698711 buttonLeftText : PropTypes . string ,
You can’t perform that action at this time.
0 commit comments