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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user