v0.3.0
Internal Changes
- All internal
data-attributes are now prefixed withdata-dnd-to avoid potential conflicts with other libraries.
New Features
- Drag handle support - add
data-dnd-handleto any element insideDndDraggableto restrict dragging to that element only. When at least one handle is present,data-dnd-no-dragis 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-handleis used, thegrabcursor 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-draganddata-dnd-handleto 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