mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fixing kanban dnd by stooping the modification of the original array by spreading to change the array reference (#3646)
This commit is contained in:
parent
06496ff0f0
commit
f64284f6a0
@ -101,9 +101,13 @@ export const handleDragDrop = async (
|
|||||||
else return await store?.removeIssue(workspaceSlug, projectId, removed);
|
else return await store?.removeIssue(workspaceSlug, projectId, removed);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const sourceIssues = subGroupBy
|
//spreading the array to stop changing the original reference
|
||||||
? (issueWithIds as TSubGroupedIssues)[sourceSubGroupByColumnId][sourceGroupByColumnId]
|
//since we are removing an id from array further down
|
||||||
: (issueWithIds as TGroupedIssues)[sourceGroupByColumnId];
|
const sourceIssues = [
|
||||||
|
...(subGroupBy
|
||||||
|
? (issueWithIds as TSubGroupedIssues)[sourceSubGroupByColumnId][sourceGroupByColumnId]
|
||||||
|
: (issueWithIds as TGroupedIssues)[sourceGroupByColumnId]),
|
||||||
|
];
|
||||||
const destinationIssues = subGroupBy
|
const destinationIssues = subGroupBy
|
||||||
? (issueWithIds as TSubGroupedIssues)[sourceSubGroupByColumnId][destinationGroupByColumnId]
|
? (issueWithIds as TSubGroupedIssues)[sourceSubGroupByColumnId][destinationGroupByColumnId]
|
||||||
: (issueWithIds as TGroupedIssues)[destinationGroupByColumnId];
|
: (issueWithIds as TGroupedIssues)[destinationGroupByColumnId];
|
||||||
|
Loading…
Reference in New Issue
Block a user