fix: collapse 没有开启收起功能能,收起配置无效 (#3243)

This commit is contained in:
liaoxuezhi 2021-12-22 11:56:08 +08:00 committed by GitHub
parent a76b5ae733
commit e1f892de0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ export class Collapse extends React.Component<CollapseProps, CollapseState> {
super(props);
this.toggleCollapsed = this.toggleCollapsed.bind(this);
this.state.collapsed = !!props.collapsed;
this.state.collapsed = props.collapsable ? !!props.collapsed : false;
}
static getDerivedStateFromProps(