github chakra-ui/zag @zag-js/dnd@2.0.0-next.4

Major Changes

  • #3342
    d6089c3 Thanks
    @github-actions! - - Add api.move({ value, to }) to move an item one step,
    or to the start or end, without dragging. It calls onDrop and announces the move.

    • Add isActivationKey to choose the key that starts a keyboard drag, or return false to turn it off.

    • Add translations.roleDescription, or null to keep the element's own role.

    • Breaking: Remove dnd.move and dnd.getDestinationIndex. Use dnd.reorder.

      - dnd.move(items, fromIndex, dnd.getDestinationIndex(items.length, fromIndex, toIndex, placement))
      + dnd.reorder(items, { source, target, placement, itemToValue: (item) => item.id })

Patch Changes

  • #3342
    730ea29 Thanks
    @github-actions! - - Fix focus, scroll and sync work scheduled for the next
    frame running after the component unmounts.
  • Updated dependencies [d6089c3,
    a80b307]:
    • @zag-js/aria-hidden@2.0.0-next.4
    • @zag-js/dom-query@2.0.0-next.4
    • @zag-js/core@2.0.0-next.4
    • @zag-js/anatomy@2.0.0-next.4
    • @zag-js/types@2.0.0-next.4
    • @zag-js/utils@2.0.0-next.4
    • @zag-js/live-region@2.0.0-next.4
    • @zag-js/rect-utils@2.0.0-next.4

Don't miss a new zag release

NewReleases is sending notifications on new releases.