Skip to content
Open
Changes from 1 commit
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
9 changes: 7 additions & 2 deletions lib/react-ui-tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ module.exports = React.createClass({
propTypes: {
tree: React.PropTypes.object.isRequired,
paddingLeft: React.PropTypes.number,
renderNode: React.PropTypes.func.isRequired
renderNode: React.PropTypes.func.isRequired,
draggable: React.PropTypes.bool
},

getDefaultProps() {
return {
paddingLeft: 20
paddingLeft: 20,
draggable: true
};
},

Expand Down Expand Up @@ -93,6 +95,9 @@ module.exports = React.createClass({
},

dragStart(id, dom, e) {
if (!this.props.draggable) {
return;
}
this.dragging = {
id: id,
w: dom.offsetWidth,
Expand Down