Skip to content
This repository was archived by the owner on Feb 1, 2024. It is now read-only.
This repository was archived by the owner on Feb 1, 2024. It is now read-only.

Checkbox input not saving checked state #42

@IlirBajrami

Description

@IlirBajrami

I'm trying to implement a form with checkboxes like this:

{Object.entries(Services).map(([value, name]) => (
        <FormItem
          id={value}
          key={value}
          label={name}
          name={name}
          value={value}
         
          onChange={setForm}
          type='checkbox'
        />
      ))}

but when i click next and then back again (of course using navigation from your useStep helper) the checkbox i previously checked is not checked anymore. How can i fix this or i have to write separate function to keep the state?

Note: The state is saved just fine on other input types using useForm, except checkbox.

EDIT: The state is not saved on any field except type text. Noticed that even if the field is of type textarea, it's not saved

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions