Skip to content

Releases: TahaSh/swapy

v1.0.5

19 Jan 12:36
Compare
Choose a tag to compare

Fix hasChanged in swapEnd event for manualSwap (#108, #111).

v1.0.4

19 Jan 11:47
Compare
Choose a tag to compare

Fix dragging handle with nested children (#116)

v1.0.3

20 Dec 13:43
Compare
Choose a tag to compare
  • Allow scroll on non-handle elements. (#47)

v1.0.2

16 Dec 07:56
Compare
Choose a tag to compare
  • Fix setting width on swap. (#97)
  • Fix swapping for items containing SVG elements. (#97)
  • Fix an item's position when parent elements use CSS transform: translate. (#54)
  • Fix data-swapy-dragging when swapping with manualSwap.

v1.0.1

14 Dec 16:55
Compare
Choose a tag to compare
  • Fix click interactions in items. (#101)

v1.0.0

14 Dec 08:29
Compare
Choose a tag to compare

I’m excited to announce that v1.0.0 is a complete rewrite of Swapy, with lots of new features, performance improvements, and bug fixes.

What's New:

  • New Full Docs – Check out the new, detailed documentation to learn everything you need about Swapy.
  • Minor API Tweaks – Some event objects have been updated for better consistency and clarity. Check out the events section to learn about them.
  • Zero Dependencies – Swapy is now fully written in pure JS with no external dependencies (without Veloxi).
  • New Config Options – Added dragOnHold, dragAxis, and enabled to give you more control over your setup.
  • Non-Draggable Areas – You can now specify areas in your items that are not draggable. Check out no-drag attribute.
  • Dynamic Updates – Use the new update method to refresh your Swapy instance dynamically as the DOM changes.
  • Swap Control – Now you can easily enable or disable swaps dynamically with onBeforeSwap.
  • Custom Drag Styling – Customize your drag item styles using the new [data-swapy-dragging] CSS selector.
  • Easier Framework Integration – New utility functions to seamlessly integrate with frameworks and dynamically add/remove items.
  • Dual Licensing – I’ve switched to a dual license model: GPLv3 and Commercial. Read more about the licensing.

I hope you find these updates useful! As always, feel free to reach out with feedback or questions.

v0.4.2

08 Oct 17:13
Compare
Choose a tag to compare
  • Clean up event listeners when swapping with manualSwap. (#70)

v0.4.1

30 Sep 16:55
Compare
Choose a tag to compare
  • Fix hasChanged in swapEnd event (#58)

v0.4.0

30 Sep 15:25
Compare
Choose a tag to compare

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);
})

Fixes

  • Fix drag jump for moved parent (#59)
  • Fix scrolling while dragging items (#30)
  • Prevent swapEnd event on click without dragging (#67, #58)
  • Fix swapy.enable() on component remount (when using React's strict mode for example) (#68)

v0.3.1

21 Sep 16:59
Compare
Choose a tag to compare
  • Fix conflict between drop swap mode and continuous mode.
  • Prevent the swapEnd event from firing multiple times per dragging session.