sortable-dnd

JS library for drag-and-drop lists, supports sortable and draggable

MIT License

Downloads
18.5K
Stars
17
Committers
3
sortable-dnd - v0.6.5 Latest Release

Published by mfuu 8 months ago

Changes

sortable-dnd - v0.6.3

Published by mfuu 10 months ago

sortable-dnd - v0.6.2

Published by mfuu 10 months ago

Added options

  • onChoose: Element is chosen
  • onUnchoose: Element is unchosen

Added callback function's params

  • revertDrag: revert draged element to initial position after moving to a another list in pull: 'clone' & revertDrag: true
  • backToOrigin: dragged element go back to the original list in pull: 'clone'

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.6.1...v0.6.2

sortable-dnd - v0.6.1

Published by mfuu 10 months ago

What's Changed

{
  from, // previous list
  to, // list, in which moved element.
  node, // dragged element
  nodes, // dragged elements
  clone, // cloned element, all dnd operations are based on cloned element and do not alter the source dom(node).
  clones, // cloned elements, there is a value only in the `pull: clone` after moving to a another list.
  target, // drop element
  oldIndex, // old index within parent
  newIndex, // new index within parent
  event, // TouchEvent | MouseEvent
  pullMode, // Pull mode if dragging into another sortable.
  relative, // Position of the drop element relative to the drag element after swap is complete.
} = params
  • Option renamed

revertClone => reverDrag

  • Deleted util: getOffset()
  • Added util: getRect()

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.6...v0.6.0

sortable-dnd - v0.5.6

Published by mfuu 11 months ago

What's Changed

adjusted the group option to support clone

// string
new Sortable(el, {
  ...,
  group: 'name'
})

// object
new Sortable(el, {
  ...,
  group: { 
    name: 'group', // group name
    pull: true | false | 'clone', // whether elements can be moved out of this list.
    put: true | false | ['foo', 'bar'], // whether elements can be added from other lists, or an array of group names from which elements can be taken.
    revertClone: true | false, // revert cloned element to initial position after moving to a another list.
  }
})

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.5...v0.5.6

sortable-dnd - v0.5.5

Published by mfuu 11 months ago

What's Changed

Add options:

Add methods https://github.com/mfuu/sortable-dnd/issues/40#issue-2028184467:

  • select(element): Selects the provided multi-drag item.
  • deselect(element): Deselects the provided multi-drag item.

Bug fixed

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.4...v0.5.5

sortable-dnd - v0.5.4

Published by mfuu over 1 year ago

sortable-dnd - v0.5.3

Published by mfuu over 1 year ago

What's Changed

  • Add option with swapOnDrop

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.2...v0.5.3

sortable-dnd - v0.5.2

Published by mfuu over 1 year ago

  • Allow autoScroll in any scroller
  • Add create, get, option methods

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.5.0...v0.5.2

sortable-dnd - v0.5.0

Published by mfuu over 1 year ago

  • Fixed the issue that the mobile group option was invalidated
  • Nested trial

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.13...v0.5.0

sortable-dnd - v0.4.13

Published by mfuu over 1 year ago

  • Fix bug that delay does not take effect
sortable-dnd - v0.4.12

Published by mfuu over 1 year ago

sortable-dnd - v0.4.11

Published by mfuu over 1 year ago

  • Fix frequently trigger change events

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.10...v0.4.11

sortable-dnd - v0.4.10

Published by mfuu over 1 year ago

  • Fix click event that conflict with delay
  • Fix the animation error when drag between groups

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.9...v0.4.10

sortable-dnd - v0.4.9

Published by mfuu over 1 year ago

  • Fix touch error
  • Animation optimization

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.6...v0.4.9

sortable-dnd - v0.4.6

Published by mfuu over 1 year ago

  • Add an option with handle
  • Adjust the option with draggable, use the handle option to set if drag action allowed
  • Adjust the arguments with onSelect and onDeselect

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.3...v0.4.6

sortable-dnd - v0.4.3

Published by mfuu over 1 year ago

sortable-dnd - v0.4.2

Published by mfuu over 1 year ago

What's Changed

  • Remove the H5 drag event
  • Deleted option: scrollStep
  • The autoScroll method is optimized

Full Changelog: https://github.com/mfuu/sortable-dnd/compare/v0.4.1...v0.4.2

sortable-dnd - v0.4.1

Published by mfuu about 2 years ago

sortable-dnd - v0.3.9

Published by mfuu about 2 years ago