reagent-project / reagent-forms

Bootstrap form components for Reagent
339 stars 78 forks source link

Radio buttons that start selected should add their value to the state #74

Closed lvh closed 8 years ago

lvh commented 8 years ago

Right now, when you use radio buttons and one of them is selected by default, nothing is written to the state, e.g.:

[:input {:field :radio :value :a :name :radioselection} "foo"]
[:input {:field :radio :value :b :name :radioselection :checked true} "bar"]
[:input {:field :radio :value :c :name :radioselection} "baz"]

... will not write :radioselection :b to the state. It seems like it should. Assuming it should; I'd be happy to contribute a PR.

yogthos commented 8 years ago

Yeah that makes sense, I've just pushed out a new version with a fix, also updated checkboxes to support the same behavior.

lvh commented 8 years ago

Awesome! Thank you!

lvh commented 8 years ago

I'm guessing this can be closed now since it's fixed in master?