github clauderic/dnd-kit @dnd-kit/sortable@5.1.0

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

Minor Changes

  • #486 d86529c Thanks @clauderic! - Improvements to better support swappable strategies:

    • Now exporting an arraySwap helper to be used instead of arrayMove onDragEnd.
    • Added the getNewIndex prop on useSortable. By default, useSortable assumes that items will be moved to their new index using arrayMove(), but this isn't always the case, especially when using strategies like rectSwappingStrategy. For those scenarios, consumers can now define custom logic that should be used to get the new index for an item on drop, for example, by computing the new order of items using arraySwap.

Patch Changes

  • Updated dependencies [d973cc6]:
    • @dnd-kit/core@4.0.2

Don't miss a new dnd-kit release

NewReleases is sending notifications on new releases.