Web:Client: disable 'Move to' button to the current folder
This commit is contained in:
parent
0e9ccf9f12
commit
2bafe2c590
@ -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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -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}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user