Fixed issue where when a task was dropped outside of a task list it would dissappear, now it just returns to where it was picked up from
This commit is contained in:
+5
-4
@@ -224,8 +224,9 @@ function OverviewScreen({ tasks, onOpen, onAddFor, density, onMoveTask, dbUsers
|
||||
<Column
|
||||
key={u.id}
|
||||
user={u}
|
||||
// Filter out the dragging task from its current column to make it "disappear" from origin
|
||||
tasks={byUser[u.id].filter(t => !draggingTask || t.id !== draggingTask.id)}
|
||||
// Do not filter out the dragging task; TaskCard handles its own visibility via the 'dragging' prop.
|
||||
// This ensures the element stays mounted and onDragEnd fires reliably.
|
||||
tasks={byUser[u.id]}
|
||||
onOpen={onOpen}
|
||||
onAdd={() => onAddFor(u.id)}
|
||||
density={density}
|
||||
@@ -435,7 +436,7 @@ function UserScreen({ user, tasks, onOpen, onAddFor, density, onMoveTask }) {
|
||||
<div className="board board--user">
|
||||
<Column
|
||||
title="Needs review" icon="⚠" colId="flagged"
|
||||
tasks={flagged.filter(t => !draggingTask || t.id !== draggingTask.id)}
|
||||
tasks={flagged}
|
||||
onOpen={onOpen} density={density}
|
||||
dragOver={dragOverCol === 'flagged'}
|
||||
onDragOver={setDragOverCol}
|
||||
@@ -451,7 +452,7 @@ function UserScreen({ user, tasks, onOpen, onAddFor, density, onMoveTask }) {
|
||||
/>
|
||||
<Column
|
||||
title="Open" icon="○" colId="open"
|
||||
tasks={open.filter(t => !draggingTask || t.id !== draggingTask.id)}
|
||||
tasks={open}
|
||||
onOpen={onOpen} density={density}
|
||||
dragOver={dragOverCol === 'open'}
|
||||
onDragOver={setDragOverCol}
|
||||
|
||||
Reference in New Issue
Block a user