Skip to content

Commit

Permalink
fix: 默认单选选择后值被重置
Browse files Browse the repository at this point in the history
  • Loading branch information
cc616 committed Dec 5, 2018
1 parent e6b4db1 commit 85b744f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/radio/Radio.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class Radio extends PureComponent {
};

componentWillReceiveProps({ checked, defaultChecked }) {
if (checked !== this.state.checked) {
if (checked !== this.props.checked) {
this.setState({
checked: defaultChecked || checked
});
Expand Down

0 comments on commit 85b744f

Please sign in to comment.