- [ BREAKING ] Update to
rescript@11.
- [ BREAKING ] Update to
rescript@10. - [ BREAKING ] Replace
bs-webapiwithrescript-webapi.
- [ BREAKING ] Switch to
@rescript/react. - [ BREAKING ] Update
bs-platform.
- [ BREAKING ] Replace
bs-logwithres-logger. - [ BREAKING ] Move
bs-webapito peer dependensies.
- [ BREAKING ] Modules of
DndEntrytype must providecmpfunction to avoid polymorphic comparison. See this diff for details. - [ BREAKING ] Minimum required version of
bs-platformis7.1.1. - [ BREAKING ] Minimum required version of
reason-reactis0.8.0.
bs-platformupdated tov7.bs-logupdated tov1.
- Added
onDragStart,onDropStart&onDropEndhandlers.
- Full rewrite using hooks api.
Features
- Horizontal lists support.
Features
- Scrollable containers support.
Features
- Auto-scroll at the vertical edges of the window.
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.
Features
- Conditional drag & drop. Now each
Droppabletakes optionalacceptprop:
~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>API
- [ BREAKING ]
Configupdated: structure is changed andeqfunction is required for both typesDraggable.tandDroppable.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 'classNamefunction receives~draggingOver: boolinstead of~draggingOver: option('droppableId)(by virtue of the first change).
- type className = (~draggingOver: option('droppableId)) => string;
+ type className = (~draggingOver: bool) => string;Improvements
- Don't interrupt text selection on desktops.
- Disable text selection on drag in Safari.
Features
- Add touch interactions support.
- Make
classNameprop a function (Draggable&Droppable).
- Core architecture.
Features
- Vertical lists.
- Multiple drop targets.