feat(EnhancedKanbanBoard): implement drag end handling for improved task interaction

- Added handleDragEnd function to reset hovered task and group states after drag operations in EnhancedKanbanBoard.
- Updated KanbanGroup and TaskCard components to support onDragEnd prop, enhancing drag-and-drop functionality and user experience during task management.
This commit is contained in:
shancds
2025-07-08 12:13:23 +05:30
parent d150747f83
commit 2aab2a21b6
3 changed files with 35 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ interface TaskCardProps {
onTaskDrop: (e: React.DragEvent, groupId: string, taskIdx: number) => void;
groupId: string;
idx: number;
onDragEnd: (e: React.DragEvent) => void; // <-- add this
}
function getDaysInMonth(year: number, month: number) {
@@ -45,7 +46,8 @@ const TaskCard: React.FC<TaskCardProps> = memo(({
onTaskDragOver,
onTaskDrop,
groupId,
idx
idx,
onDragEnd // <-- add this
}) => {
const { socket } = useSocket();
const themeMode = useSelector((state: RootState) => state.themeReducer.mode);
@@ -213,7 +215,7 @@ const TaskCard: React.FC<TaskCardProps> = memo(({
onTaskDragOver(e, groupId, isDown ? idx + 1 : idx);
}}
onDrop={e => onTaskDrop(e, groupId, idx)}
onDragEnd={onDragEnd} // <-- add this
onClick={e => handleCardClick(e, task.id!)}
>
<div className="task-content">