From c030d8a1e32e32223a99727f686700a78c58003a Mon Sep 17 00:00:00 2001 From: Anze Vavpetic Date: Fri, 22 Nov 2019 15:49:18 +0100 Subject: [PATCH] Adds support for a cb func to be called on value change --- package.json | 2 +- src/withPickerValues/PickerModal.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e8807f9..78ed0da 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-formik", - "version": "0.0.2", + "version": "0.0.3", "description": "Make the most of your React Native forms with Formik", "main": "index.js", "type": "index.d.ts", diff --git a/src/withPickerValues/PickerModal.js b/src/withPickerValues/PickerModal.js index aa983af..1364410 100644 --- a/src/withPickerValues/PickerModal.js +++ b/src/withPickerValues/PickerModal.js @@ -19,6 +19,7 @@ class PickerModal extends PureComponent { onValueChange = (value: any) => { if (this.props.onChangeText) this.props.onChangeText(value); if (this.props.onSubmitEditing) this.props.onSubmitEditing(); + if (this.props.onChangeCb) this.props.onChangeCb(value); }; renderPicker = () => {