diff --git a/components/radio/demo/radiogroup-more.md b/components/radio/demo/radiogroup-more.md index 7d58053823..befcac97b4 100644 --- a/components/radio/demo/radiogroup-more.md +++ b/components/radio/demo/radiogroup-more.md @@ -37,10 +37,10 @@ const App = React.createClass({ }; return ( - Option A - Option B - Option C - + Option A + Option B + Option C + More... {this.state.value === 4 ? : null} diff --git a/components/radio/demo/radiogroup.md b/components/radio/demo/radiogroup.md index 2c44833bb1..5b8a7457ab 100644 --- a/components/radio/demo/radiogroup.md +++ b/components/radio/demo/radiogroup.md @@ -32,10 +32,10 @@ const App = React.createClass({ render() { return ( - A - B - C - D + A + B + C + D ); }, diff --git a/components/radio/group.tsx b/components/radio/group.tsx index d5d784a870..826aa087c1 100644 --- a/components/radio/group.tsx +++ b/components/radio/group.tsx @@ -84,11 +84,7 @@ export default class RadioGroup extends React.Component { const props = this.props; const children = !props.children ? [] : React.Children.map(props.children, (radio: any) => { if (radio && (radio.type === Radio || radio.type === RadioButton) && radio.props) { - const keyProps = {}; - if (!('key' in radio) && typeof radio.props.value === 'string') { - (keyProps as any).key = radio.props.value; - } - return React.cloneElement(radio, assign({}, keyProps, radio.props, { + return React.cloneElement(radio, assign({}, radio.props, { onChange: this.onRadioChange, checked: this.state.value === radio.props.value, disabled: radio.props.disabled || this.props.disabled,