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

Checkbox indeterminate state #674

Closed
davidoween opened this issue Jan 24, 2018 · 2 comments · Fixed by #675 or #678
Closed

Checkbox indeterminate state #674

davidoween opened this issue Jan 24, 2018 · 2 comments · Fixed by #675 or #678
Labels

Comments

@davidoween
Copy link

Hello,

How can I assign a default value to checkbox. I tried with defaultValue: true, but it does not work.

Or how can I remove the "indeterminate view-state" of a checkbox.

https://css-tricks.com/wp-content/uploads/2011/08/checkboxstates.png

capture

Thanks

@Pat-Lovelace
Copy link

I would like to remove the state 'indeterminate', because sometimes I won't have an initial model for a checkbox type field, and I don't want an 'indeterminate' state, I mean, instead of a 'dash' checkbox, I want to see a empty checkbox.

Is there any way to avoid this state?
For instance, modifying the JSON field of a checkbox type field:

{
      key: 'example',
      type: 'checkbox',
      templateOptions: {
        label: 'example',
        indeterminate: false
      },
}

Having a initial model like: example = false, it's not a solution for me.

@Pat-Lovelace
Copy link

Now it's perfect! Thanks! ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants