Dynamically setFieldValue to group of checkboxes in formik #3655
Unanswered
aliraza944
asked this question in
Q&A
Replies: 1 comment
-
If it comes before using the form, then pass your filled And here's how you could add one during using the form:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
MY Problem
I am trying the set the field values to the group of checkboxes using the
formik.setFieldValue
property. These values are coming from a backend API in the form of an array.My Code
I am using the useFormik hook of the formik library to handle checkbox values. I have set up the
formik.handleChange
on my checkboxes onChange function. Here is the bare minimum code snippet of my application.How do I use the
formik.setFieldValue
to set the value to my checkboxes coming from the backend?Beta Was this translation helpful? Give feedback.
All reactions