Major Changes
-
#427
f96cb5d
Thanks @clauderic! - - Using transform-agnostic measurements for the DragOverlay node.- Renamed the
overlayNode
property todragOverlay
on theDndContextDescriptor
interface.
- Renamed the
-
9cfac05
Thanks @clauderic! - Renamed thewasSorting
property towasDragging
on theSortableContext
andAnimateLayoutChanges
interfaces.
Minor Changes
- #433
c447880
Thanks @clauderic! - Fix unwanted animations when items in sortable context change
Patch Changes
-
#372
dbc9601
Thanks @clauderic! - RefactoredDroppableContainers
type fromRecord<UniqueIdentifier, DroppableContainer
to a custom instance that extends theMap
constructor and adds a few other methods such astoArray()
,getEnabled()
andgetNodeFor(id)
.A unique
key
property was also added to theDraggableNode
andDroppableContainer
interfaces. This prevents potential race conditions in the mount and cleanup effects ofuseDraggable
anduseDroppable
. It's possible for the clean-up effect to run after another React component usinguseDraggable
oruseDroppable
mounts, which causes the newly mounted element to accidentally be un-registered. -
#350
a13dbb6
Thanks @wmain! - Breaking change: TheCollisionDetection
interface has been refactored. It now receives an object that contains theactive
draggable node, along with thecollisionRect
and an array ofdroppableContainers
.If you've built custom collision detection algorithms, you'll need to update them. Refer to this PR for examples of how to refactor collision detection functions to the new
CollisionDetection
interface.The
sortableKeyboardCoordinates
method has also been updated since it relies on theclosestCorners
collision detection algorithm. If you were using collision detection strategies in a customsortableKeyboardCoordinates
method, you'll need to update those as well. -
86d1f27
Thanks @clauderic! - Fixed a bug in thehorizontalListSortingStrategy
where it did not check if thecurrentRect
was undefined. -
e42a711
Thanks @clauderic! - Fixed a bug with the default layout animation function where it could returntrue
initially even if the list had not been sorted yet. Now checking thewasDragging
property to ensure no layout animation occurs ifwasDragging
is false. -
#341
e02b737
Thanks @clauderic! - Returnundefined
instead ofnull
fortransition
inuseSortable
-
Updated dependencies [
13be602
,aede2cc
,05d6a78
,a32a4c5
,f96cb5d
,dea715c
,dbc9601
,46ec5e4
,7006464
,0e628bc
,c447880
,2ba6dfe
,8d70540
,13be602
,422d083
,c4b21b4
,5a41340
,a13dbb6
,e2ee0dc
,1fe9b5c
,1fe9b5c
,1f5ca27
]:- @dnd-kit/core@4.0.0
- @dnd-kit/utilities@3.0.0