You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is the source code for my form. I am using Formik for form handling. Essentially, users are granted permissions for specific modules, with available permissions being read, write, update, or delete. The form includes checkboxes corresponding to the permissions the user already possesses. However, users are currently unable to uncheck these already checked checkboxes. I appreciate any assistance in resolving this issue.
@RanaMuzamal , in the above code, the checked attribute is not controlled by formik due to which its not able to change the state of checkbox. Try setting the InitialValues obj instead,
using above, you won't need to specify the checked attribute as formik will handle the initialValue of checkbox from the initialValues obj. You might also need to refactor your code.
Below is the source code for my form. I am using Formik for form handling. Essentially, users are granted permissions for specific modules, with available permissions being read, write, update, or delete. The form includes checkboxes corresponding to the permissions the user already possesses. However, users are currently unable to uncheck these already checked checkboxes. I appreciate any assistance in resolving this issue.
);
};
export default AssignPermissionForm;`
Current Behaviour
But not be be able to uncheck already checked
Expected Behaviour
The user should be able to uncheck already checked checkbox or check any uncheckbox
Version
"formik": "^2.4.2",
"react": "^18.2.0",
The text was updated successfully, but these errors were encountered: