Fixes to tree
This commit is contained in:
@@ -76,12 +76,15 @@ var Node = React.createClass({
|
||||
placeholder: index.id === dragging,
|
||||
rootNode: this.props.rootNode,
|
||||
})} style={style}>
|
||||
<div className={ styles.inner } ref="inner" onMouseDown={this.handleMouseDown}>
|
||||
<div
|
||||
className={ styles.inner }
|
||||
ref="inner"
|
||||
onMouseDown={this.props.rootNode ? (e) => e.stopPropagation() : this.handleMouseDown}
|
||||
>
|
||||
{!this.props.rootNode && this.renderCollapse()}
|
||||
<span
|
||||
className={ cx(styles.nodeLabel, { rootLabel: this.props.rootNode }) }
|
||||
onClick={() => { history.push(node.url) }}
|
||||
onMouseDown={this.props.rootNode ? function(e){e.stopPropagation()} : undefined}
|
||||
>
|
||||
{ node.title }
|
||||
</span>
|
||||
|
||||
@@ -230,7 +230,8 @@ module.exports = React.createClass({
|
||||
tree: tree
|
||||
});
|
||||
|
||||
this.change(tree);
|
||||
// Don't push updates as collapsing is separated from store state
|
||||
// this.change(tree);
|
||||
},
|
||||
|
||||
// buildTreeNumbering(tree) {
|
||||
|
||||
Reference in New Issue
Block a user