angular-tree-control icon indicating copy to clipboard operation
angular-tree-control copied to clipboard

Add custom contents to expanded node

Open oysteinmyrmo opened this issue 9 years ago • 1 comments

I have created a tree with custom views (specifically Angular Material Design views) that are being show when the tree is expanded using Angular UI Tree. That tree does not scale at all, however, so at about 500-600 nodes the tree became unusable. Therefore I am trying out this tree instead, but I cannot figure out if there is a way to add custom views/HTML inside the tree.

Could you please advise on whether this is possible and, if so, some best practices to achieve this?

I have set up the simple case on your Github page for testing. The HTML is now like this:

<treecontrol tree-model="dataForTheTree" options="treeOptions" on-selection="showSelected(node)" selected-node="node1" class="tree-classic">Employee: {{node.name}} age {{node.age}}
    <md-content>trollolol
        <md-button class="md-fab"></md-button>
    </md-content>
</treecontrol>

which is stupid, but you get the idea. The output looks like this:

treecontrol

Here is an example of an existing working tree, using Angular UI Tree, that is painfully slow. This tree has the "ui-tree-handle" directive to insert into divs and other items, which enables us to insert HTML and what not.

treecontrol2

oysteinmyrmo avatar Jun 09 '16 14:06 oysteinmyrmo

Hi oysteinmyrmo,

Have you ever solved this? Or did you use another library?

Regards,

Thomas

thomas-vl avatar Sep 24 '16 15:09 thomas-vl