mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-22 16:56:57 +00:00
fix selection state error after copy items (#7474)
* fix selection state error after copy items * optimize --------- Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
parent
d9019be22f
commit
659ada62d3
@ -820,6 +820,7 @@ class LibContentView extends React.Component {
|
|||||||
|
|
||||||
let dirNames = this.getSelectedDirentNames();
|
let dirNames = this.getSelectedDirentNames();
|
||||||
seafileAPI.copyDir(repoID, destRepo.repo_id, destDirentPath, this.state.path, dirNames).then(res => {
|
seafileAPI.copyDir(repoID, destRepo.repo_id, destDirentPath, this.state.path, dirNames).then(res => {
|
||||||
|
this.onSelectedDirentListUpdate([]);
|
||||||
if (repoID !== destRepo.repo_id) {
|
if (repoID !== destRepo.repo_id) {
|
||||||
this.setState({
|
this.setState({
|
||||||
asyncCopyMoveTaskId: res.data.task_id,
|
asyncCopyMoveTaskId: res.data.task_id,
|
||||||
@ -1315,6 +1316,7 @@ class LibContentView extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
copyItemsAjaxCallback = (repoID, targetRepo, dirent, copyToDirentPath, nodeParentPath, taskId, byDialog = false) => {
|
copyItemsAjaxCallback = (repoID, targetRepo, dirent, copyToDirentPath, nodeParentPath, taskId, byDialog = false) => {
|
||||||
|
this.onSelectedDirentListUpdate([]);
|
||||||
if (repoID !== targetRepo.repo_id) {
|
if (repoID !== targetRepo.repo_id) {
|
||||||
this.setState({
|
this.setState({
|
||||||
asyncCopyMoveTaskId: taskId,
|
asyncCopyMoveTaskId: taskId,
|
||||||
@ -1495,6 +1497,7 @@ class LibContentView extends React.Component {
|
|||||||
isDirentSelected: newSelectedDirentList.length > 0,
|
isDirentSelected: newSelectedDirentList.length > 0,
|
||||||
selectedDirentList: newSelectedDirentList,
|
selectedDirentList: newSelectedDirentList,
|
||||||
lastSelectedIndex: lastSelectedIndex,
|
lastSelectedIndex: lastSelectedIndex,
|
||||||
|
isAllDirentSelected: newSelectedDirentList.length === this.state.direntList.length,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user