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:
@@ -69,6 +69,7 @@
|
||||
23. **Keyboard Shortcuts:** Added global support for keyboard navigation:
|
||||
- **`Escape`**: Instantly close any open modal (Task Detail, Add Task, Settings, or Audit Logs).
|
||||
- **`n`**: Open the "Add Task" modal from the main dashboard (disabled while typing in inputs).
|
||||
24. **Drag-and-Drop Stability:** Fixed a bug where tasks would "disappear" if dropped in an invalid area. Tasks now remain visible at their original position if a drop is cancelled.
|
||||
|
||||
### Phase 3: Advanced Features
|
||||
- **Real-time Notifications:** Explore WebSockets for task assignments.
|
||||
|
||||
+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