Release 0.4.0
martinpengellyphillips
released this
09 Jan 13:40
·
117 commits
to main
since this release
Added
- TypeScript Typings! Thanks to
@areknawo, Solid DnD is now fully typed.
Changed
-
Breaking Change As part of adding typings to Solid DnD, change most
function signatures to use positional parameters over an options object. This
simplifies the typing and makes it easier to use and understand the function
parameters.For reference, the rules used when applying this change were:
- Default to multiple positional params. For example, a call to
createDraggable({ id })
should now becreateDraggable(id)
. - Use an object when multiple params are related as a single entity (such as
an 'event'). For example, anonDragEnd(event)
handler can remain unchanged
(accepting a single parameter). - Use an options object when there are a large number of parameters (>3).
- Default to multiple positional params. For example, a call to
-
Breaking Change Rename
DragDropContext
toDragDropProvider
and
SortableContext
toSortableProvider
to match Solid convention and better
reflect usage. Note thatuseDragDropContext
anduseSortableContext
remain
unchanged.
Fixed
- Fix
eventMap[key] is undefined
error when attempting to drag a draggable
that has been composed manually using thedraggable.dragActivators
property.
This was due to naive key renaming in theasHandlers
logic and so did not
affect draggable usage as a directive.