Created
March 20, 2019 05:31
-
-
Save rohanBagchi/5d3fa1410a012f1e34f51671bdeb5856 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const innerFieldData = { | |
| id: props.selectedItem.id, | |
| ...values, // formik's form field values | |
| }; | |
| const getFieldUniqueId = (data: any) => data.id; | |
| <InnerField | |
| fieldData={innerFieldData} | |
| getFieldValue={(innerFieldData: any) => innerFieldData['itemDescription']} | |
| getFieldUniqueId={getFieldUniqueId} | |
| > | |
| {({ handleChange: innerHandleChange, value }: any) => { | |
| return ( | |
| <TextArea | |
| placeholder='DESCRIPTION' | |
| name="itemDescription" | |
| value={value} | |
| onBlur={(e: any) => { | |
| handleBlur(e); // formik's handleBlur | |
| handleChange(e); // formik's handleChange | |
| }} | |
| onChange={innerHandleChange} | |
| /> | |
| ) | |
| }} | |
| </InnerField> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment