react-sortable-item
Advanced tools
Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "react-sortable-item", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Reorder elements in a list. Uses the native HTML5 Drag and Drop API.", | ||
@@ -5,0 +5,0 @@ "main": "index.es5.js", |
@@ -7,3 +7,3 @@ # react-sortable-item | ||
This library is quite different from other react-sortable libraries in that it treats the reindexing strategy as an implementation detail. | ||
This library is different from other react-sortable libraries in that it treats the reindexing strategy as an implementation detail of the drop event. This makes it easier to accept data from other sources (other windows, files from your desktop, etc). | ||
@@ -22,8 +22,8 @@ ## Install | ||
var ExampleSortableList = React.createClass({ | ||
handleDrop: function(dropPath, position, event) {}, | ||
handleDrop(dropPath, position, event) {}, | ||
handleAcceptTest: function(event) {}, | ||
handleAcceptTest(event) {}, | ||
render: function() { | ||
var list = yourRecords.map(function(record) { | ||
render() { | ||
var list = yourRecords.map((record) => { | ||
return ( | ||
@@ -42,4 +42,4 @@ <SortableItem | ||
</SortableItem> | ||
); | ||
}.bind(this)) | ||
) | ||
}) | ||
return ( | ||
@@ -46,0 +46,0 @@ <ul> |
5448