import { observer } from '../../../globals/src'; @observer export default class TreeBranches extends Component { shouldComponentUpdate() { return false; } render() { const treeNode = this.props.treeNode; const { expanded } = treeNode; if (!expanded) { return null; } const branchClassName = classNames({ branches: !isRootNode(treeNode.node), // 'x-branch': treeNode.hasXIf() && treeNode.branchIndex !== treeNode.branchNode!.children.length - 1, }); let children: any = []; if (treeNode.hasChildren() /* || node.hasSlots() */) { children = treeNode.children.map((child: TreeNode) => { if (child.hasXIf()) { if (child.flowIndex === 0) { const conditionFlowContainer = classNames('condition-group-container', { hidden: child.hidden, }); return (
Condition Flow
{child.conditionGroup!.children.map(c => { return ; })}
); } else { return null; } } return ; }); } if (treeNode.dropIndex != null) { children.splice( treeNode.dropIndex, 0,
tree.mountInsertion(ref)} className="insertion" />, ); } return children.length > 0 &&
{children}
; } }