Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@

startDrag: function (event, target, index) {
if (!this.moved) {
if (this.props.startDrag)
this.props.startDrag()

var rect = target.getBoundingClientRect();

var draggedStyle = {
Expand Down Expand Up @@ -577,6 +580,9 @@
// Stop dragging - reset style & draggedIndex, handle reorder
onWindowUp: function (event) {
clearTimeout(this.holdTimeout);

if (this.props.stopDrag)
this.props.stopDrag()

if (this.isDragging() && this.isDraggingFrom()) {
var fromIndex = this.state.draggedIndex;
Expand Down Expand Up @@ -780,7 +786,9 @@
autoScroll: PropTypes.bool,
autoScrollParents: PropTypes.bool,
disabled: PropTypes.bool,
disableContextMenus: PropTypes.bool
disableContextMenus: PropTypes.bool,
startDrag: PropTypes.func,
stopDrag: PropTypes.func
};

Reorder.defaultProps = {
Expand Down