Skip to content

Upgrade SortableList

Jure requested to merge upgrade_sortable_list into master

This jumps 8 major versions of react-dnd and implements a change of the API in the following way:

  1. Change from a DragAndDropContext to DndProvider (see react-dnd docs for examples)
  2. Prop listItem to ListItem
  3. Prop dragHandle to DragHandle
  4. new previewRef prop: this is the prop that enables the SortableList to get a reference for a drag preview, and in the absence of a handleRef, also a reference for the drag itself.
  5. new handleRef prop: sets the reference for the handle

Two new live examples of a SortableList with and without a handle have been added, so do check those out!

Edited by Jure

Merge request reports