Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
morningLemon opened this issue Aug 13, 2018 · 0 comments

Comments

@morningLemon
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant