Skip to content

Material-UI custom redux-form-material-ui RadioGroup <Radio /> control prop #274

Open
@morningLemon

Description

@morningLemon

I would like to compose a custom RadioGroup element as seen in this example. Ideally I'd like to have an Avatar as a sibling to the radio element of the control pro. Im stumbling on this JS warning below or at least understanding the root of why inputRef cant spread to this element.

React does not recognize the inputRef prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase inputref instead. If you accidentally passed it from a parent component, remove it from the DOM element.

As you can see in the example the custom control prop breaks the RadioGroup functionality making it multi-select. Is this custom Radio component possible?

<Field name="bestFramework" component={RadioGroup}> <FormControlLabel control={ <span> <Radio value="react" /> <Avatar alt="react" src="https://image.flaticon.com/icons/svg/53/53058.svg" /> </span> } label="React" value="react" /> <Radio value="angular" label="Angular" /> <Radio value="ember" label="Ember" /> </Field>

Any ideas or assistance much appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions