Minor Changes
-
#486
d86529c
Thanks @clauderic! - Improvements to better support swappable strategies:- Now exporting an
arraySwap
helper to be used instead ofarrayMove
onDragEnd
. - Added the
getNewIndex
prop onuseSortable
. By default,useSortable
assumes that items will be moved to their new index usingarrayMove()
, but this isn't always the case, especially when using strategies likerectSwappingStrategy
. 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 usingarraySwap
.
- Now exporting an
Patch Changes
- Updated dependencies [
d973cc6
]:- @dnd-kit/core@4.0.2