react-native-formik
Advanced tools
+1
-1
@@ -16,3 +16,3 @@ import * as React from 'react'; | ||
| export interface withErrorProps { | ||
| name: string; | ||
| error: string; | ||
| } | ||
@@ -19,0 +19,0 @@ |
+1
-1
| { | ||
| "name": "react-native-formik", | ||
| "version": "1.7.5", | ||
| "version": "1.7.6", | ||
| "description": "Make the most of your React Native forms with Formik", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
+13
-2
@@ -385,3 +385,3 @@ # React Native Formik [](https://coveralls.io/github/bamlab/react-native-formik?branch=master) [](https://opensource.org/licenses/MIT) [](https://github.com/semantic-release/semantic-release) [](https://www.npmjs.com/package/react-native-formik) [](https://www.npmjs.com/package/react-native-formik) | ||
| ### withNextInputAutoFocus | ||
| ### withNextInputAutoFocus [See example in Snack](https://snack.expo.io/@almouro/Z3JlYX) | ||
@@ -400,3 +400,14 @@ - when an input is submitted, it will automatically focuses on the next or submit the form if it's the last one | ||
| const MyInput = withNextInputAutoFocusInput(TextInput); | ||
| class CustomInput extends React.PureComponent { | ||
| // Implement a focus function that focused whatever needs to be focused | ||
| focus = () => { this.input.focus(); } | ||
| render() { | ||
| return ( | ||
| <TextField ref={input => this.input = input} {...this.props} /> | ||
| ); | ||
| } | ||
| } | ||
| const MyInput = withNextInputAutoFocusInput(CustomInput); | ||
| const Form = withNextInputAutoFocusForm(View); | ||
@@ -403,0 +414,0 @@ |
Sorry, the diff of this file is too big to display
2467733
0.03%563
1.99%