andrewhathaway / Winterfell

Generate complex, validated and extendable JSON-based forms in React.
http://winterfell.andrewhathaway.net
MIT License
785 stars 116 forks source link

must pass defaultChecked so CheckboxInput can use #56

Closed stevecrozz closed 7 years ago

stevecrozz commented 8 years ago

CheckboxInput was not able to use the defaultChecked property because it was not included in the properties sent to the input.

I can rebuild the ./dist files if you like, but when I did, there were changes in all the ./dist files, so I figured I should ask before updating them all. The changes looked like they might be innocuous minification changes.

stevecrozz commented 8 years ago

Although, I see that I could pass defaultChecked as part of the props object like this. Is this the intended way to do it?

{
  questionId: 'indexed',
  input: {
    type: 'checkboxInput',
    text: 'Indexed',
    value: true,
    props: {
      defaultChecked: true
    }
  }
}
andrewhathaway commented 8 years ago

Hi @stevecrozz. Apologies for getting back to you so late. Did this work? If so, I can remove this PR.