import React from 'react';
import history from 'utils/History';
import styles from './Tree.scss';
import classNames from 'classnames/bind';
const cx = classNames.bind(styles);
class Node extends React.Component {
displayName: 'UITreeNode'
renderCollapse = () => {
var index = this.props.index;
if(index.children && index.children.length) {
var collapsed = index.node.collapsed;
return (
);
}
return null;
}
renderChildren = () => {
var index = this.props.index;
var tree = this.props.tree;
var dragging = this.props.dragging;
if(index.children && index.children.length) {
var childrenStyles = {};
if (!this.props.rootNode) {
if(index.node.collapsed) childrenStyles.display = 'none';
childrenStyles['paddingLeft'] = this.props.paddingLeft + 'px';
}
return (