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

[RadioButton] add callback signatures to docs; improve other props #3797

Merged
merged 1 commit into from
Mar 27, 2016
Merged

[RadioButton] add callback signatures to docs; improve other props #3797

merged 1 commit into from
Mar 27, 2016

Conversation

theosherry
Copy link
Contributor

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

Hey, another one for #3096. I noticed that the onCheck callback of RadioButton elements wasn't being called when they were part of a RadioButtonGroup, so I added a bit of warning for this behaviour.

* `RadioButtonGroup`.
*
* @param {object} event `change` event targeting the element.
* @param {string} value The element's `value`.
*/
onCheck: React.PropTypes.func,
Copy link
Member

Choose a reason for hiding this comment

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

Would RadioButton ever be used outside of the RadioButtonGroup, or could this just be @ignored?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't think of any use for it outside of a RadioButtonGroup; if checked was a public prop on RadioButton it could be used independently, but since it isn't @ignore seems better.

Copy link
Member

Choose a reason for hiding this comment

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

Feel free to change it then. You could leave (update) the description etc for internal reference.

@mbrookes
Copy link
Member

Thanks @theosherry 👍

@mbrookes mbrookes added the docs Improvements or additions to the documentation label Mar 26, 2016
@oliviertassinari oliviertassinari merged commit 3b239d2 into mui:master Mar 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants