Upgrade SortableList
This jumps 8 major versions of react-dnd
and implements a change of the API in the following way:
- Change from a DragAndDropContext to DndProvider (see react-dnd docs for examples)
- Prop
listItem
toListItem
- Prop
dragHandle
toDragHandle
- 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.
- 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