Good evening everyone, I am having a small issue with custom Formik Fields..
I am using an own custom Field such as:
<Field name="pdfFile" component={FileUpload} />
FileUpload Props look like:
interface FileUploadProps {
field: FieldInputProps<any>; //These props should probably be derived from Formik
form: FormikProps<any>;
width: string;
height: string;
}
field and form are correctly passed into the component, but how can I pass width and height into the component? Tried it like, but without success.
<Field
name="pdfFile"
component={(props: any) => (
<FileUpload
field={props.field}
form={props.form}
width={pdfWidth}
height={pdfHeight}
/>
)}
/>
Formik API unfortunately doesn't mention how to solve this problem. Has anyone experienced similar issues and knows how to resolve this?
Thanks a lot for your help!