Web:Client: fix move to parent folder for folders

This commit is contained in:
TimofeyBoyko 2022-10-24 15:48:11 +05:00
parent c1a889282f
commit 9eb353d1ba
2 changed files with 3 additions and 3 deletions

View File

@ -207,7 +207,6 @@ class SelectFolderDialog extends React.Component {
selectionFiles,
sharedRoomId,
resultingFolderTree,
id,
} = this.props;
const { displayType, isLoadingData, isAvailable } = this.state;
@ -224,7 +223,8 @@ class SelectFolderDialog extends React.Component {
const buttonIsDisabled =
isDisableButton ||
(isRecycleBin && currentFolderId === resultingFolderId);
(isRecycleBin && currentFolderId === resultingFolderId) ||
selectionFiles[0]?.parentId === +resultingFolderId;
const isCurrentFolder = +currentFolderId === +resultingFolderId;

View File

@ -218,7 +218,7 @@ class SectionHeaderContent extends React.Component {
onMoveAction = () => {
this.props.setIsFolderActions(true);
this.props.setBufferSelection(this.props.currentFolderId);
this.props.setBufferSelection(this.props.selectedFolder);
return this.props.setMoveToPanelVisible(true);
};
onCopyAction = () => {