react-sortable-item
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -22,2 +22,11 @@ 'use strict'; | ||
propTypes: { | ||
handleAcceptTest: _React2['default'].PropTypes.func.isRequired, | ||
handleDrop: _React2['default'].PropTypes.func.isRequired, | ||
handleDragStart: _React2['default'].PropTypes.func, | ||
handleDragOver: _React2['default'].PropTypes.func, | ||
handleDragEnd: _React2['default'].PropTypes.func, | ||
handleDragLeave: _React2['default'].PropTypes.func | ||
}, | ||
getInitialState: function getInitialState() { | ||
@@ -36,2 +45,5 @@ return { | ||
this.setState({ dragging: true }); | ||
if (this.props.handleDragStart) { | ||
this.props.handleDragStart(event); | ||
} | ||
}, | ||
@@ -57,2 +69,6 @@ | ||
}event.preventDefault(); | ||
if (this.props.handleDragOver) { | ||
this.props.handleDragOver(event); | ||
} | ||
}, | ||
@@ -62,2 +78,5 @@ | ||
this.setState({ dragging: false }); | ||
if (this.props.handleDragEnd) { | ||
this.props.handleDragEnd(event); | ||
} | ||
}, | ||
@@ -70,2 +89,5 @@ | ||
event.preventDefault(); | ||
if (this.props.handleDragLeave) { | ||
this.props.handleDragLeave(event); | ||
} | ||
}, | ||
@@ -72,0 +94,0 @@ |
{ | ||
"name": "react-sortable-item", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Reorder elements in a list. Uses the native HTML5 Drag and Drop API.", | ||
@@ -5,0 +5,0 @@ "main": "index.es5.js", |
6475
102