I am using react-textarea-autosize and formik and I am wondering how to properly hook the change events of formik to TextareaAutosize?
<Formik
initialValues={{
description: ''
}}
validationSchema={Yup.object().shape({
})}
onSubmit={(values, { setSubmitting, setErrors }) => {
console.log('v', values)
}}
render={props => (
<Form autoComplete="off">
<div className="field">
<label className="label">Description</label>
<div className="control">
<TextareaAutosize
className="input"
onChange={props.handleChange}
onBlur={props.handleBlur}
name="description"
value={props.values.description}
/>
</div>
</div>
</Form>
)}
So when I do an onSubmit, I do see the data that is entered in the textarea but when I do an "enter" in the textarea I get these errors
onloadwff.js:71 Assertion failed: Input argument is not an HTMLInputElement
getFormProfile @ onloadwff.js:71
setFieldValue @ onloadwff.js:71
formKeydownListener @ onloadwff.js:71
onloadwff.js:71 Uncaught TypeError: Cannot read property 'type' of undefined
at e.setFieldValue (onloadwff.js:71)
at HTMLFormElement.formKeydownListener (onloadwff.js:71)
setFieldValue @ onloadwff.js:71
formKeydownListener @ onloadwff.js:71