diff --git a/README.md b/README.md index 00bcc752..73b5e077 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,13 @@ __[Demo](http://jakesidsmith.github.io/react-reorderable/)__ // Class to be applied to each list item's wrapper element itemClass='list-item', // A function to be called if a list item is clicked (before hold time is up) - itemClicked={this.itemClicked} /> + itemClicked={this.itemClicked} + // The item to be selected (adds 'selected' class) + selected={this.state.selected} + // The key to compare from the selected item object with each item object + selectedKey='uuid' + // Allows reordering to be disabled + disableReorder={false}/> ``` 2. Using standard Javascript @@ -98,7 +104,13 @@ __[Demo](http://jakesidsmith.github.io/react-reorderable/)__ // Class to be applied to each list item's wrapper element itemClass: 'list-item', // A function to be called if a list item is clicked (before hold time is up) - itemClicked: this.itemClicked}) + itemClicked: this.itemClicked + // The item to be selected (adds 'selected' class) + selected: this.state.selected + // The key to compare from the selected item object with each item object + selectedKey: 'uuid' + // Allows reordering to be disabled + disableReorder: false}) ``` 5. Callback functions diff --git a/bower.json b/bower.json index d171a457..f52a419c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "react-reorderable", - "version": "1.2.1", + "version": "1.3.0", "description": "Drag & drop, touch enabled, reorderable / sortable list, React component", "homepage": "https://github.com/JakeSidSmith/react-reorderable", "license": "MIT", diff --git a/package.json b/package.json index 1390d5c7..ca09ce42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-reorderable", - "version": "1.2.1", + "version": "1.3.0", "description": "Drag & drop, touch enabled, reorderable / sortable list, React component", "author": "Jake 'Sid' Smith", "license": "MIT", diff --git a/reorderable.js b/reorderable.js index 149c51fd..03b463d9 100644 --- a/reorderable.js +++ b/reorderable.js @@ -459,7 +459,10 @@ var getPropsTemplate = function (item) { if (self.props.template) { - return React.createElement(self.props.template, {item: item}); + return React.createElement(self.props.template, { + item: item, + sharedProps: self.props.sharedProps + }); } return item; };