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

[RadioGroup] Support defaultValue in uncontrolled mode #14092

Merged

Conversation

Slessi
Copy link
Contributor

@Slessi Slessi commented Jan 5, 2019

Related to #13915

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Slessi You are right, we should be supporting the defaultValue property! Given the component root element is a <div> element, I think that we should:

  • document this new supported property
  • destructure it in the render method so it doesn't leak to the child.

This change makes me think of the react-final-form integration with Material-UI.
People can either provide the RadioGroup as a form field component or provide each Radio (the encouraged approach).

packages/material-ui/src/RadioGroup/RadioGroup.js Outdated Show resolved Hide resolved
packages/material-ui/src/RadioGroup/RadioGroup.js Outdated Show resolved Hide resolved
@oliviertassinari oliviertassinari added new feature New feature or request component: radio This is the name of the generic UI component, not the React module! PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Jan 5, 2019
@oliviertassinari oliviertassinari added PR: good for merge and removed PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Jan 5, 2019
@oliviertassinari oliviertassinari merged commit f2e1869 into mui:master Jan 6, 2019
@eps1lon eps1lon mentioned this pull request Feb 2, 2019
56 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: radio This is the name of the generic UI component, not the React module! new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants