mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
Fix input defaultValue and value
This commit is contained in:
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…
Reference in New Issue
Block a user