showing results for - "redux form radio not returning value"
Michele
20 Apr 2016
1const radioButtonGenerator = (
2  { input, type, options, meta: { touched, error, warning } }
3) => (
4  <div>
5  {
6    options.map(o =>
7      <div className={classnames(['radio-container'])}>
8        <label key={o.value} className={classnames(['radio'])}>
9          <input
10            className={classnames(['radio-dot'])}
11            type='radio'
12            {...input}
13            value={o.value}
14            checked={o.value === input.value}
15          />
16        </label>
17        <span className={classnames(['radio-label'])}>
18          {o.title}
19        </span>
20      </div>
21    )
22  }
23  </div>
24)
25
26const RadioButton = ({ content, renderField }) => (
27  <div className={classnames(['radio-buttons'])}>
28    <Field
29      component={radioButtonGenerator}
30      name={content.id}
31      id={content.id}
32      options={content.options}
33    />
34  </div>
35)
36