Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why don't checkboxes work? #123

Open
unbywyd opened this issue Apr 6, 2022 · 0 comments
Open

Why don't checkboxes work? #123

unbywyd opened this issue Apr 6, 2022 · 0 comments

Comments

@unbywyd
Copy link

unbywyd commented Apr 6, 2022

I can't get the checkboxes to work, what am I doing wrong?

Model

model: {
    checkbox: true,
}

uiSchema

uiSchema: [
  {
    component: "div",
    fieldOptions: {
      class: ["form-group"],
    },
    children: [
      {
        component: "div",
        children: [
          {
            component: "input",
            model: "checkbox",
            valueProp: "checked",
            fieldOptions: {
              on: ["change"],
              attrs: {
                name: "checkbox",
                type: "checkbox",
              },
            },
          },
        ],
      },
    ],
  },
],

Schema

   schema: {
        type: "object",
        required: ["checkbox"],
        properties: {
          checkbox: {
            type: "boolean",
          },
        },
   }

Example

  1. Checkbox not responding to model
  2. onChangeState not working when i interact with checkbox

What is the problem? ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant