File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -366,15 +366,18 @@ Pass in the Formik touched value for the input as a prop.
366366Wraps your component into a ` TouchableOpacity ` which, when pressed, opens a dialog to pick a value.
367367You need to provide a ` values ` props with the pickable items.
368368
369+ If you need to dismiss the picker's "Keyboard", you can use ` KeyboardModal.dismiss() ` like below.
370+
369371``` javascript
370372import { TextInput , View } from ' react-native' ;
371- import { withPickerValues } from ' react-native-formik' ;
373+ import { compose } from " recompose" ;
374+ import makeInput , { KeyboardModal , withPickerValues } from ' react-native-formik' ;
372375
373- const MyPicker = withPickerValues (TextInput);
376+ const MyPicker = compose (makeInput, withPickerValues) (TextInput);
374377
375378export default props => (
376379 < Formik
377- onSubmit= {values => console .log (values)}
380+ onSubmit= {values => { KeyboardModal . dismiss (); console .log (values); } }
378381 validationSchema= {validationSchema}
379382 render= {props => {
380383 return (
You can’t perform that action at this time.
0 commit comments