Web: FolderTreeBody: Refactoring.
This commit is contained in:
parent
2514c1c1a8
commit
172c009ab0
@ -87,13 +87,10 @@ class TreeFolders extends React.Component {
|
||||
selectedFolder && setItemSecurity(selectedFolder.security);
|
||||
};
|
||||
componentDidMount() {
|
||||
const { selectionFiles, expandedPanelKeys, data } = this.props;
|
||||
const { selectionFiles, expandedPanelKeys = [], data } = this.props;
|
||||
this.props.isLoadingNodes && this.props.setIsLoadingNodes(false);
|
||||
|
||||
const isOpenInEditor = !expandedPanelKeys;
|
||||
const isRootFolder = isOpenInEditor
|
||||
? true
|
||||
: expandedPanelKeys?.length === 0;
|
||||
const isRootFolder = expandedPanelKeys.length === 0;
|
||||
|
||||
isRootFolder && this.setItemSecurityRights(data);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user