Closed Quantisan closed 9 years ago
Sounds like you just have to handle the additional case for the state of the checkbox component. A pr sounds great, let me know if you need any additional pointers with it.
Turns out there's a defaultChecked
property that should have been used. This works out of the box:
[:input {:type :checkbox :name :foo :value true :defaultChecked true}]
When I default check a checkbox with
[:input {:type :checkbox :checked true}]
, user can't manually uncheck it. It appears that the checkbox value is not updated by check/uncheck. So right now I'm just hacking it with an atom state and doing:on-click
to swap the attribute. Is that the recommended way?Any suggestion on how to get checkbox to just work out of the box with reagent-forms? I can submit a pull request if you give me some pointers.