diff --git a/web/client/components/TOC/DefaultGroup.jsx b/web/client/components/TOC/DefaultGroup.jsx index 4bd8bd7c91..93f8c9fa92 100644 --- a/web/client/components/TOC/DefaultGroup.jsx +++ b/web/client/components/TOC/DefaultGroup.jsx @@ -18,6 +18,7 @@ var DefaultGroup = React.createClass({ style: React.PropTypes.object, sortableStyle: React.PropTypes.object, onToggle: React.PropTypes.func, + level: React.PropTypes.number, onSort: React.PropTypes.func, propertiesChangeHandler: React.PropTypes.func, groupVisibilityCheckbox: React.PropTypes.bool, @@ -34,20 +35,21 @@ var DefaultGroup = React.createClass({ sortableStyle: {}, propertiesChangeHandler: () => {}, groupVisibilityCheckbox: false, - visibilityCheckType: "glyph" + visibilityCheckType: "glyph", + level: 1 }; }, render() { let {children, onToggle, ...other } = this.props; return ( - + { this.props.groupVisibilityCheckbox && } - + {this.props.children} diff --git a/web/client/components/TOC/fragments/GroupChildren.jsx b/web/client/components/TOC/fragments/GroupChildren.jsx index 69e60d7dad..130b78a2e6 100644 --- a/web/client/components/TOC/fragments/GroupChildren.jsx +++ b/web/client/components/TOC/fragments/GroupChildren.jsx @@ -14,7 +14,8 @@ const GroupChildren = React.createClass({ propTypes: { node: React.PropTypes.object, filter: React.PropTypes.func, - onSort: React.PropTypes.func + onSort: React.PropTypes.func, + level: React.PropTypes.number }, statics: { inheritedPropTypes: ['node', 'filter', 'onSort'] @@ -23,7 +24,8 @@ const GroupChildren = React.createClass({ return { node: null, filter: () => true, - onSort: null + onSort: null, + level: 1 }; }, render() { @@ -36,6 +38,7 @@ const GroupChildren = React.createClass({ node: node, key: node.id, sortData: i++, + level: this.props.level, isDraggable: !!this.props.onSort }))); }