Open adambedford opened 2 years ago
Just roll your own Form component like so:
import { Formik } from 'formik';
import { Form } from 'react-bootstrap';
export const FormikComponent = ({ children, ...props }) => (
<Formik {...props}>
{(formikBag) => (
<Form
onSubmit={formikBag.handleSubmit}
onReset={formikBag.handleReset}
>
{children(formikBag)}
</Form>
)}
</Formik>
);
import { FormikComponent } from './formikComponent';
import { Form as RBF } from 'react-bootstrap-formik';
const { Input } = RBF;
<FormikComponent initialValues={{ email: '' }} onSubmit={handleSubmit}>
{({ isSubmitting }) => (
<Input name="email" label="Email" />
)}
</FormikComponent>
Is there a way to get access to
formik.isSubmitting
within the form to disable the submit button?