v0.4.0
This version supports auto-scrolling while dragging.
Features
autoScrollOnDrag
(#73)
Enabling autoScrollOnDrag
in Swapy's config options will cause the page or container to auto-scroll when dragging an item near the edge.
createSwapy(container, {
autoScrollOnDrag: true
})
Add hasChanged
to swapEnd event (#58)
The swapEnd event object now includes a new parameter, hasChanged
, which indicates whether any items were swapped during the drag session.
swapy.onSwapEnd(({ data, hasChanged }) => {
console.log(hasChanged);
console.log('end', data);
})