github clauderic/dnd-kit @dnd-kit/core@1.2.0

latest releases: @dnd-kit/core@6.0.8, @dnd-kit/sortable@7.0.2, @dnd-kit/core@6.0.7...
3 years ago

Minor Changes

  • 79f6088 #144 Thanks @clauderic! - Allow consumers to determine whether to animate layout changes and when to measure nodes. Consumers can now use the animateLayoutChanges prop of useSortable to determine whether layout animations should occur. Consumers can now also decide when to measure layouts, and at what frequency using the layoutMeasuring prop of DndContext. 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 the layoutMeasuring prop on DndContext and the animateLayoutChanges prop of useSortable 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! - Added onActivation option to sensors. Delegated the responsibility of calling event.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 the onActivation 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 if transform.x and transform.y are both zero.

Don't miss a new dnd-kit release

NewReleases is sending notifications on new releases.