From 9205e397255ac5de96f4425a746fecc75ad419f1 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Fri, 17 May 2024 11:59:43 -0500 Subject: [PATCH] fix: make FormikCheck useField like other fields --- .../src/lib/FieldWrapperFormik/fields/FormikCheck.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/core-components/src/lib/FieldWrapperFormik/fields/FormikCheck.tsx b/libs/core-components/src/lib/FieldWrapperFormik/fields/FormikCheck.tsx index d77569897..c356b4308 100644 --- a/libs/core-components/src/lib/FieldWrapperFormik/fields/FormikCheck.tsx +++ b/libs/core-components/src/lib/FieldWrapperFormik/fields/FormikCheck.tsx @@ -1,4 +1,4 @@ -import { FieldInputProps, Field } from 'formik'; +import { FieldInputProps, Field, useField } from 'formik'; import { FormikInputProps } from '.'; import { Input, FormText, FormGroup, Label } from 'reactstrap'; import styles from './FormikCheck.module.css'; @@ -10,6 +10,7 @@ const FormikCheck: React.FC = ({ description, ...props }: FormikInputProps) => { + const [field] = useField(name); return (