gerhat / material-ui-formik-components

Formik ready material ui components
MIT License
85 stars 13 forks source link

RadioGroup - cannot read property 'formControl' of undefined #40

Closed wsmith2020 closed 3 years ago

wsmith2020 commented 3 years ago

I'm trying to use RadioGroup component and get an issue "cannot read property 'formControl' of undefined"

<Field
name="seniority"
label="Seniority"
options={[
  label: 'Junior', value: 'Junior' },
]}
component={RadioGroup}
/>
FRadioGroup.render
node_modules/material-ui-formik-components/RadioGroup/RadioGroup.js:70
  67 | _createClass(FRadioGroup, [{
  68 |   key: "render",
  69 |   value: function render() {
> 70 |     var _this$props = this.props,
     | ^  71 |         label = _this$props.label,
  72 |         field = _this$props.field,
  73 |         _this$props$form = _this$props.form,

Could you add example of RadioGroup usage?

Codesandox

gerhat commented 3 years ago

@wsmith2020 can you check if version 0.7.2 fixes the issue? Thanks.

wsmith2020 commented 3 years ago

@wsmith2020 can you check if version 0.7.2 fixes the issue? Thanks.

hi @gerhat works fine on 0.7.2 :)