Skip to content

Latest commit

 

History

History
140 lines (111 loc) · 3.1 KB

HISTORY.md

File metadata and controls

140 lines (111 loc) · 3.1 KB

History

UNRELEASED


6.0.0

  • [ BREAKING ] Update to rescript@11.

5.0.0

  • [ BREAKING ] Update to rescript@10.
  • [ BREAKING ] Replace bs-webapi with rescript-webapi.

4.0.0

  • [ BREAKING ] Switch to @rescript/react.
  • [ BREAKING ] Update bs-platform.

3.0.0

  • [ BREAKING ] Replace bs-log with res-logger.
  • [ BREAKING ] Move bs-webapi to peer dependensies.

2.0.0

  • [ BREAKING ] Modules of DndEntry type must provide cmp function to avoid polymorphic comparison. See this diff for details.
  • [ BREAKING ] Minimum required version of bs-platform is 7.1.1.
  • [ BREAKING ] Minimum required version of reason-react is 0.8.0.

1.2.0

  • bs-platform updated to v7.
  • bs-log updated to v1.

1.1.0

  • Added onDragStart, onDropStart & onDropEnd handlers.

1.0.0

  • Full rewrite using hooks api.

0.6.0

Features

  • Horizontal lists support.

0.5.0

Features

  • Scrollable containers support.

0.4.0

Features

  • Auto-scroll at the vertical edges of the window.

0.3.1

Fixes

  • Fix sorting for case when draggable that being dragged is way bigger or smaller than siblings.
  • Fix determination of a landing point when dropping on empty droppable with header.

0.3.0

Features

  • Conditional drag & drop. Now each Droppable takes optional accept prop:
~accept: option(Draggable.t => bool)=?

<Dnd.Droppable
  accept=(
    fun
    | Todo => true
    | TodoList => false
  )
/>
  • Custom drag handles.
/* Without custom drag handle */
<Dnd.Draggable>
  ...(Children("Drag me" |> ReasonReact.string))
</Dnd.Draggable>

/* With custom drag handle */
<Dnd.Draggable>
  ...(
    ChildrenWithHandle(
      handle =>
        <button
          style=handle.style
          onMouseDown=handle.onMouseDown
          onTouchStart=handle.onTouchStart
        >
          ("Drag me" |> ReasonReact.string)
        </button>
    )
  )
</Dnd.Draggable>

0.2.0

API

  • [ BREAKING ] Config updated: structure is changed and eq function is required for both types Draggable.t and Droppable.t. It should improve overall perf.
- module type Config = {
-   type draggableId;
-   type droppableId;
- };

+ module type Config = {
+   module Draggable: {
+     type t;
+     let eq: (t, t) => bool;
+   };
+
+   module Droppable: {
+     type t;
+     let eq: (t, t) => bool;
+   };
+ };
  • [ BREAKING ] Droppable's 'className function receives ~draggingOver: bool instead of ~draggingOver: option('droppableId) (by virtue of the first change).
- type className = (~draggingOver: option('droppableId)) => string;
+ type className = (~draggingOver: bool) => string;

0.1.1

Improvements

  • Don't interrupt text selection on desktops.
  • Disable text selection on drag in Safari.

0.1.0

Features

  • Add touch interactions support.
  • Make className prop a function (Draggable & Droppable).

0.0.1

  • Core architecture.

Features

  • Vertical lists.
  • Multiple drop targets.