Skip to content

Release 0.4.0

Compare
Choose a tag to compare
@martinpengellyphillips martinpengellyphillips released this 09 Jan 13:40
· 117 commits to main since this release

Added

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 be createDraggable(id).
    • Use an object when multiple params are related as a single entity (such as
      an 'event'). For example, an onDragEnd(event) handler can remain unchanged
      (accepting a single parameter).
    • Use an options object when there are a large number of parameters (>3).
  • Breaking Change Rename DragDropContext to DragDropProvider and
    SortableContext to SortableProvider to match Solid convention and better
    reflect usage. Note that useDragDropContext and useSortableContext remain
    unchanged.

Fixed

  • Fix eventMap[key] is undefined error when attempting to drag a draggable
    that has been composed manually using the draggable.dragActivators property.
    This was due to naive key renaming in the asHandlers logic and so did not
    affect draggable usage as a directive.