fix: kanban drag and drop (#508)

This commit is contained in:
Aaryan Khandelwal 2023-03-23 18:52:18 +05:30 committed by GitHub
parent feb0e40559
commit 567afa6d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -201,7 +201,7 @@ export const IssuesView: React.FC<Props> = ({ type = "issue", openIssuesListModa
if (!prevData) return prevData; if (!prevData) return prevData;
const sourceGroupArray = prevData[sourceGroup]; const sourceGroupArray = prevData[sourceGroup];
const destinationGroupArray = prevData[destinationGroup]; const destinationGroupArray = groupedByIssues[destinationGroup];
sourceGroupArray.splice(source.index, 1); sourceGroupArray.splice(source.index, 1);
destinationGroupArray.splice(destination.index, 0, draggedItem); destinationGroupArray.splice(destination.index, 0, draggedItem);
@ -223,7 +223,7 @@ export const IssuesView: React.FC<Props> = ({ type = "issue", openIssuesListModa
if (!prevData) return prevData; if (!prevData) return prevData;
const sourceGroupArray = prevData[sourceGroup]; const sourceGroupArray = prevData[sourceGroup];
const destinationGroupArray = prevData[destinationGroup]; const destinationGroupArray = groupedByIssues[destinationGroup];
sourceGroupArray.splice(source.index, 1); sourceGroupArray.splice(source.index, 1);
destinationGroupArray.splice(destination.index, 0, draggedItem); destinationGroupArray.splice(destination.index, 0, draggedItem);
@ -243,7 +243,7 @@ export const IssuesView: React.FC<Props> = ({ type = "issue", openIssuesListModa
if (!prevData) return prevData; if (!prevData) return prevData;
const sourceGroupArray = prevData[sourceGroup]; const sourceGroupArray = prevData[sourceGroup];
const destinationGroupArray = prevData[destinationGroup]; const destinationGroupArray = groupedByIssues[destinationGroup];
sourceGroupArray.splice(source.index, 1); sourceGroupArray.splice(source.index, 1);
destinationGroupArray.splice(destination.index, 0, draggedItem); destinationGroupArray.splice(destination.index, 0, draggedItem);