mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
fix Cascader defaultValue
This commit is contained in:
parent
3e97b393a2
commit
67aa04eb14
@ -21,8 +21,14 @@ export default class Cascader extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
let value;
|
||||
if ('value' in props) {
|
||||
value = props.value;
|
||||
} else if ('defaultValue' in props) {
|
||||
value = props.defaultValue;
|
||||
}
|
||||
this.state = {
|
||||
value: props.value || props.defaultValue || [],
|
||||
value: value || [],
|
||||
popupVisible: false,
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user