diff --git a/packages/common-components/src/CheckboxInput/FormikCheckboxInput.tsx b/packages/common-components/src/CheckboxInput/FormikCheckboxInput.tsx index 2dd8917103..3f00239154 100644 --- a/packages/common-components/src/CheckboxInput/FormikCheckboxInput.tsx +++ b/packages/common-components/src/CheckboxInput/FormikCheckboxInput.tsx @@ -3,13 +3,14 @@ import { useField } from "formik" import CheckboxInput from "./CheckboxInput" interface IFormikCheckboxProps - extends Omit, "label"> { + extends Omit, "label" | "onClick"> { className?: string name: string label?: string | ReactNode + onClick?: (event: React.MouseEvent) => void } -const FormikCheckboxInput: React.FC = ({ name, onChange, ...props }) => { +const FormikCheckboxInput: React.FC = ({ name, onChange, onClick, ...props }) => { const [field, meta, helpers] = useField(name) const handleChange = (event: React.FormEvent) => { @@ -20,6 +21,7 @@ const FormikCheckboxInput: React.FC = ({ name, onChange, . return (