From 4f54334e7ca2259f153fc8ebd12be58f34de66c6 Mon Sep 17 00:00:00 2001 From: Almouro Date: Tue, 15 May 2018 19:36:28 +0200 Subject: [PATCH] docs(picker): correct picker doc --- README.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b68d3cc..4a3d395 100644 --- a/README.md +++ b/README.md @@ -366,15 +366,18 @@ Pass in the Formik touched value for the input as a prop. Wraps your component into a `TouchableOpacity` which, when pressed, opens a dialog to pick a value. You need to provide a `values` props with the pickable items. +If you need to dismiss the picker's "Keyboard", you can use `KeyboardModal.dismiss()` like below. + ```javascript import { TextInput, View } from 'react-native'; -import { withPickerValues } from 'react-native-formik'; +import { compose } from "recompose"; +import makeInput, { KeyboardModal, withPickerValues } from 'react-native-formik'; -const MyPicker = withPickerValues(TextInput); +const MyPicker = compose(makeInput, withPickerValues)(TextInput); export default props => ( console.log(values)} + onSubmit={values => { KeyboardModal.dismiss(); console.log(values); }} validationSchema={validationSchema} render={props => { return (