Fixes to tree

This commit is contained in:
Jori Lallo
2016-06-26 22:15:15 -07:00
parent 6fef3137a1
commit e967033b28
5 changed files with 16 additions and 7 deletions

View File

@@ -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>

View File

@@ -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) {