diff --git a/README.md b/README.md index 23fbc0f9..fe31eaff 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ npm install react-ui-tree --save diff --git a/lib/react-ui-tree.js b/lib/react-ui-tree.js index 1c3c4154..5f55bb2d 100644 --- a/lib/react-ui-tree.js +++ b/lib/react-ui-tree.js @@ -7,6 +7,7 @@ class UITree extends Component { static propTypes = { tree: PropTypes.object.isRequired, paddingLeft: PropTypes.number, + freeze: React.PropTypes.bool, renderNode: PropTypes.func.isRequired }; @@ -85,7 +86,7 @@ class UITree extends Component { index={tree.getIndex(1)} key={1} paddingLeft={this.props.paddingLeft} - onDragStart={this.dragStart} + onDragStart={this.props.freeze ? null : this.dragStart} onCollapse={this.toggleCollapse} dragging={dragging && dragging.id} />