Fix disabled props in RadioGroup, closes #603

This commit is contained in:
afc163 2015-11-27 14:29:03 +08:00
parent 820d9d7880
commit eb828f0eba
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ ReactDOM.render(<div>
<div>
<RadioGroup onChange={onChange} defaultValue="a">
<RadioButton value="a">杭州</RadioButton>
<RadioButton value="b">上海</RadioButton>
<RadioButton value="b" disabled>上海</RadioButton>
<RadioButton value="c">北京</RadioButton>
<RadioButton value="d">成都</RadioButton>
</RadioGroup>

View File

@ -42,7 +42,7 @@ export default React.createClass({
{...radio.props}
onChange={this.onRadioChange}
checked={this.state.value === radio.props.value}
disabled={this.props.disabled}
disabled={radio.props.disabled || this.props.disabled}
/>;
}
return radio;