Skip to content

v0.3.0

Choose a tag to compare

@Horuse Horuse released this 19 Feb 18:33
· 184 commits to main since this release

Internal Changes

  • All internal data- attributes are now prefixed with data-dnd- to avoid potential conflicts with other libraries.

New Features

  • Drag handle support - add data-dnd-handle to any element inside DndDraggable to restrict dragging to that element only. When at least one handle is present, data-dnd-no-drag is ignored and dragging from anywhere else is automatically blocked. Multiple handles are supported.
<DndDraggable id={column.id}>
    <h2 data-dnd-handle>Drag here</h2>
    <div><!-- won't drag --></div>
</DndDraggable>
  • Cursor scoping - when data-dnd-handle is used, the grab cursor is applied only to handle elements instead of the entire draggable item.

Bug Fixes

  • Fixed drop zones inside a dragged element appearing in debug overlay - droppables that are children of the currently dragged element are now skipped during zone registration.
  • Fixed drag event bubbling in nested draggables.
  • Preserved debug zones toggle state across drags.

Documentation

  • CSS Classes section moved from HTML Attributes page to CSS Custom Properties page (now CSS Custom Properties & Classes).
  • Added examples for data-dnd-no-drag and data-dnd-handle to the HTML Attributes page.
  • Added FAQ sections.
  • Updated all attribute references across docs and examples to use the new data-dnd- prefix.

Full Changelog: v0.2.0...v0.3.0