Releases: clauderic/dnd-kit
@dnd-kit/[email protected]
Minor Changes
79f6088
#144 Thanks @clauderic! - Allow consumers to determine whether to animate layout changes and when to measure nodes. Consumers can now use theanimateLayoutChanges
prop ofuseSortable
to determine whether layout animations should occur. Consumers can now also decide when to measure layouts, and at what frequency using thelayoutMeasuring
prop ofDndContext
. By default,DndContext
will measure layouts just-in-time after sorting has begun. Consumers can override this behaviour to either only measure before dragging begins (on mount and after dragging), or always (on mount, before dragging, after dragging). Pairing thelayoutMeasuring
prop onDndContext
and theanimateLayoutChanges
prop ofuseSortable
opens up a number of new possibilities for consumers, such as animating insertion and removal of items in a sortable list.
Patch Changes
- Updated dependencies [
adb7bd5
,79f6088
,a76cd5a
]:- @dnd-kit/[email protected]
@dnd-kit/[email protected]
Patch Changes
-
6a5c8a1
#154 Thanks @clauderic! - Update implementation of FirstArgument -
Updated dependencies [
6a5c8a1
]:- @dnd-kit/[email protected]
@dnd-kit/[email protected]
Patch Changes
75bebf5
#152 Thanks @clauderic! - Update dependencies of @dnd-kit/core to ^1.2.0
@dnd-kit/[email protected]
Minor Changes
-
79f6088
#144 Thanks @clauderic! - Allow consumers to determine whether to animate layout changes and when to measure nodes. Consumers can now use theanimateLayoutChanges
prop ofuseSortable
to determine whether layout animations should occur. Consumers can now also decide when to measure layouts, and at what frequency using thelayoutMeasuring
prop ofDndContext
. By default,DndContext
will measure layouts just-in-time after sorting has begun. Consumers can override this behaviour to either only measure before dragging begins (on mount and after dragging), or always (on mount, before dragging, after dragging). Pairing thelayoutMeasuring
prop onDndContext
and theanimateLayoutChanges
prop ofuseSortable
opens up a number of new possibilities for consumers, such as animating insertion and removal of items in a sortable list. -
a76cd5a
#136 Thanks @clauderic! - AddedonActivation
option to sensors. Delegated the responsibility of callingevent.preventDefault()
on activation to consumers, as consumers have the most context to decide whether it is appropriate or not to prevent the default browser behaviour on activation. Consumers of the sensors can prevent the default behaviour on activation using theonActivation
option. Here is an example using the Pointer sensor:useSensor(PointerSensor, {onActivation: (event) => event.preventDefault()})
Patch Changes
adb7bd5
#151 Thanks @clauderic! -DragOverlay
now attempts to perform drop animation even iftransform.x
andtransform.y
are both zero.
@dnd-kit/[email protected]
Minor Changes
-
ac674e8
#135 Thanks @ranbena! - AddeddragCancel
prop to DndContext. ThedragCancel
prop can be used to cancel a drag operation on drop. The prop accepts a function that returns a boolean, or a promise returning a boolean once resolved. Returnfalse
to cancel the drop. -
208f68e
#111 Thanks @ranbena! - Keyboard sensor now cancels dragging on window resize
@dnd-kit/[email protected]
Patch Changes
423610c
#56 Thanks @clauderic! - Add MIT license to package.json and distributed files
@dnd-kit/[email protected]
Patch Changes
-
423610c
#56 Thanks @clauderic! - Add MIT license to package.json and distributed files -
Updated dependencies [
423610c
,594a24e
,fd25eaf
]:- @dnd-kit/[email protected]
- @dnd-kit/[email protected]
@dnd-kit/[email protected]
Patch Changes
-
423610c
#56 Thanks @clauderic! - Add MIT license to package.json and distributed files -
Updated dependencies [
423610c
,594a24e
,fd25eaf
]:- @dnd-kit/[email protected]
- @dnd-kit/[email protected]
@dnd-kit/[email protected]
Patch Changes
-
423610c
#56 Thanks @clauderic! - Add MIT license to package.json and distributed files -
594a24e
#106 Thanks @ranbena! - Replaceanimation.finished
withanimation.onfinish
for DragOverlay drop animation as the latter has much better support across browsers. -
fd25eaf
#68 Thanks @Pustelto! - Wrap attributes returned from useDraggable hook in useMemo to allow pure component optimization -
Updated dependencies [
423610c
]:- @dnd-kit/[email protected]
- @dnd-kit/[email protected]
@dnd-kit/[email protected]
Patch Changes
423610c
#56 Thanks @clauderic! - Add MIT license to package.json and distributed files