Fix input defaultValue and value

pull/13779/head^2
afc163 6 years ago committed by 偏右
parent a7786267a7
commit b0df3c1225

@ -78,7 +78,7 @@ class Input extends React.Component<InputProps, any> {
constructor(props: InputProps) {
super(props);
const value = props.value || props.defaultValue;
const value = typeof props.value === 'undefined' ? props.defaultValue : props.value;
this.state = {
value,
};

Loading…
Cancel
Save