Closed debender495 closed 4 years ago
Take a look at the documentation about the templates. You can have a custom template for the treeNode and in that build your columns. We are in the process of documenting this better.
Quick example on how it could look with the columns:
<tree-root [nodes]="nodes">
<ng-template #treeNodeWrapperTemplate let-node let-index="index">
<div class="node-wrapper" [style.padding-left]="node.getNodePadding()">
<tree-node-expander [node]="node"></tree-node-expander>
<div class="node-content-wrapper"
[class.node-content-wrapper-active]="node.isActive"
[class.node-content-wrapper-focused]="node.isFocused"
(click)="node.mouseAction('click', $event)"
(dblclick)="node.mouseAction('dblClick', $event)"
(contextmenu)="node.mouseAction('contextMenu', $event)"
(treeDrop)="node.onDrop($event)"
[treeAllowDrop]="node.allowDrop"
[treeDrag]="node"
[treeDragEnabled]="node.allowDrag()">
<div class="tree-column-wrapper">
<div class="tree-column" [title]="node.data.name">
<span>{{ node.data.name }}</span>
</div>
<div
*ngFor="let columnName of columns"
class="tree-column"
[title]="node.data[columnName]">
<span>{{node.data[columnName]}}</span>
</div>
</div>
</div>
</div>
</ng-template>
</tree-root>
Closing this issue due to inactivity. Please open a new issue if the problem still exists.
PLEASE READ CAREFULLY!
Reproduce
Please reproduce here if reporting a bug, or requesting help: https://stackblitz.com/edit/angular-wxansn
Additional Info
Use the Slack Channel
The fastest way to get an answer is via the slack channel: https://angular-tree-component.herokuapp.com/
You will also get updates on releases, bugfixes and other announcements.
Search Docs First
Please look for an answer in the docs before submitting an issue: angular2-tree.readme.io.