Web:Client: disable 'Move to' button to the current folder

This commit is contained in:
TimofeyBoyko 2022-10-10 18:59:28 +05:00
parent 0e9ccf9f12
commit 2bafe2c590
2 changed files with 4 additions and 4 deletions

View File

@ -218,7 +218,7 @@ class SelectFolderDialog extends React.Component {
isDisableButton ||
(isRecycleBin && currentFolderId === resultingFolderId);
const isSameFolder = +currentFolderId === +resultingFolderId;
const isCurrentFolder = +currentFolderId === +resultingFolderId;
return displayType === "aside" ? (
<SelectFolderDialogAsideView
@ -274,7 +274,7 @@ class SelectFolderDialog extends React.Component {
folderSelection
newFilter={this.newFilter}
isDisableButton={buttonIsDisabled}
isSameFolder={isSameFolder}
isCurrentFolder={isCurrentFolder}
/>
);
}

View File

@ -51,7 +51,7 @@ const SelectionPanelBody = ({
parentId,
selectionFiles,
folderSelectionDisabled,
isSameFolder,
isCurrentFolder,
}) => {
return (
<StyledModalDialog
@ -144,7 +144,7 @@ const SelectionPanelBody = ({
(!fileId && !folderSelection) ||
!canCreate ||
!(folderId && resultingFolderTree) ||
isSameFolder
isCurrentFolder
}
isLoading={isDisableTree}
/>