gcanti / tcomb-form

Forms library for react
https://gcanti.github.io/tcomb-form
MIT License
1.16k stars 136 forks source link

Radio buttons in list? #203

Closed SFPink closed 8 years ago

SFPink commented 9 years ago

How would I go about adding radio buttons into a list.

For example say I had a list of telephone numbers and I wanted to add a radio button to the side of each number called primary. So the user could only select one primary.

One option is to use checkboxes and some form of boolean struct to fill values. However just wondering if there are alternate methods?

Regards

benmonro commented 8 years ago

I would look at using a custom factory (i.e. a react component that follows some rules). https://github.com/gcanti/tcomb-form/blob/master/GUIDE.md#custom-factories