Closed smogg closed 8 years ago
Is there value in having both :checked
and :default-checked
for setting the default value?
:checked
does set the initial value in the state, but it makes radios unusable. Apparently, they are read only after using it, so you have to write your own on-change
events to let users use them.
:default-checked
Makes radios (visually) selected and you can actually click to change the radio selection without adding any additional code, but the state is not updated initially.
The idea is that the form elements represent the state in the atom though. I think the case where the element looks selected on the UI, but its value is not populated in the atom would be a bug.
Unless I'm misunderstanding the intent of the change?
Ah ok I tried it just now and see what you mean, with :checked
the value in the ui can't be updated, while it does change in the atom. So, the idea would be to use :default-checked
to set the initial state instead.
Just pushed out the fix to Clojars with 0.5.13
, let me know if that addresses the issue.
Yup, that works. Thanks!
I think this can be closed now?
yeah think so :)
When using
:default-checked
on radio buttons:The first button is (visually) selected, but the state value is not set.
Similar issue to #74