CoreUI checkboxes not working with Formik

Hello,

I’m trying to implement Formik to take care of my forms but I have some difficulties with the checkboxes.
I firstly created a component based on CoreUI CInputChecbox to wire it to Formik using hooks:

import React from "react";
import { useField } from "formik";
import {
  CLabel,
  CInvalidFeedback,
  CInputCheckbox,
  CFormGroup,
} from "@coreui/react";
const CInputChecboxFormik = ({ children, ...props }) => {
  const [field, meta] = useField({ ...props, type: "checkbox" });
  return (
    <CFormGroup>
      <CFormGroup variant="custom-checkbox">
        <CInputCheckbox
          custom
          {...field}
          {...props}
          invalid={meta.touched && meta.error ? true : false}
        />
        <CLabel variant="custom-checkbox" htmlFor={props.id || props.name}>
          {children}
        </CLabel>
        <CInvalidFeedback>{meta.error}</CInvalidFeedback>
      </CFormGroup>
    </CFormGroup>
  );
};
export default CInputChecboxFormik; 

Then I try to create a form with it:

                  <Formik
                    initialValues={initialValues}
                    validationSchema={validationSchema}
                    onSubmit={onSubmit}
                  >
                    <Form>
                      <CInputCheckboxFormik name="remember">
                        Stay connected
                      </CInputCheckboxFormik>
                      <CFormGroup>
                        <CRow>
                          <CCol xs="6">
                            <CButton
                              type="submit"
                              color="primary"
                              className="px-4"
                            >
                              Submit
                            </CButton>
                          </CCol>
                        </CRow>
                      </CFormGroup>
                    </Form> 

The problem I have is that I can’t toggle the checkbox, it stays in the initial value.

Can you help me to make Formik work ?

Thank you