|
|
@ -7,15 +7,7 @@ import getFormikErrorMessages from '../lib/getFormikErrorMessages'; |
|
|
|
|
|
|
|
|
|
|
|
const useFormikUtils = <Values extends FormikValues = FormikValues>( |
|
|
|
const useFormikUtils = <Values extends FormikValues = FormikValues>( |
|
|
|
...formikArgs: Parameters<UseFormik<Values>> |
|
|
|
...formikArgs: Parameters<UseFormik<Values>> |
|
|
|
): { |
|
|
|
): FormikUtils<Values> => { |
|
|
|
disableAutocomplete: ( |
|
|
|
|
|
|
|
overwrite?: Partial<OutlinedInputProps>, |
|
|
|
|
|
|
|
) => OutlinedInputProps; |
|
|
|
|
|
|
|
disabledSubmit: boolean; |
|
|
|
|
|
|
|
formik: Formik<Values>; |
|
|
|
|
|
|
|
formikErrors: Messages; |
|
|
|
|
|
|
|
handleChange: FormikChangeHandler<Values>; |
|
|
|
|
|
|
|
} => { |
|
|
|
|
|
|
|
const [formikConfig, ...restFormikArgs] = formikArgs; |
|
|
|
const [formikConfig, ...restFormikArgs] = formikArgs; |
|
|
|
|
|
|
|
|
|
|
|
const formik = useFormik<Values>({ ...formikConfig }, ...restFormikArgs); |
|
|
|
const formik = useFormik<Values>({ ...formikConfig }, ...restFormikArgs); |
|
|
|