chore(collections/board): fix unnecessary repaint

This commit is contained in:
Elian Doran 2025-09-12 15:29:20 +03:00
parent c8f9d6e6df
commit 0844f60343
No known key found for this signature in database

View File

@ -147,8 +147,10 @@ function useDragging({ column, columnIndex, columnItems }: DragContext) {
} }
} }
setDropPosition({ column, index: newIndex }); if (!(dropPosition?.column === column && dropPosition.index === newIndex)) {
}, [column, setDropTarget, setDropPosition]); setDropPosition({ column, index: newIndex });
}
}, [column, setDropTarget, dropPosition, setDropPosition]);
const handleDragLeave = useCallback((e: DragEvent) => { const handleDragLeave = useCallback((e: DragEvent) => {
const relatedTarget = e.relatedTarget as HTMLElement; const relatedTarget = e.relatedTarget as HTMLElement;