feat(enhanced-kanban): implement synchronous reordering for tasks and groups
- Added synchronous state updates for task and group reordering in the EnhancedKanbanBoard component, improving UI responsiveness during drag-and-drop operations. - Introduced new actions `reorderTasks` and `reorderGroups` in the enhanced-kanban slice for better state management. - Updated EnhancedKanbanGroup and EnhancedKanbanTaskCard components to utilize the new layout change animations, enhancing the user experience during reordering.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import React, { useMemo, useRef, useEffect, useState } from 'react';
|
||||
import { useDroppable } from '@dnd-kit/core';
|
||||
import { SortableContext, verticalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
||||
import { SortableContext, verticalListSortingStrategy, useSortable, defaultAnimateLayoutChanges } from '@dnd-kit/sortable';
|
||||
import { CSS } from '@dnd-kit/utilities';
|
||||
import { ITaskListGroup } from '@/types/tasks/taskList.types';
|
||||
import EnhancedKanbanTaskCard from './EnhancedKanbanTaskCard';
|
||||
@@ -46,6 +46,7 @@ const EnhancedKanbanGroup: React.FC<EnhancedKanbanGroupProps> = React.memo(({
|
||||
type: 'group',
|
||||
group,
|
||||
},
|
||||
animateLayoutChanges: defaultAnimateLayoutChanges,
|
||||
});
|
||||
|
||||
const groupRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
Reference in New Issue
Block a user