Closed valikonen closed 7 years ago
No idea?! This directive is a nightmare, I will bookmark and never use from this user...
Hi @valikonen .
First, this is open source software. You are invited to not use this directive or use anything else you feel like. I am not working for you, not getting paid for publishing this directive.
Second, if you had, instead of just complaining, did a little search, you will find that the directive is based on ng-repeat and those the performance issues you see arise from ng-repeat.
Third, you can decide and be of use to the community and help improve performance of angular-tree-control. Submit a pool-request with the right tests and docs and we will merge it.
First, this is open source software. You are invited to not use this directive or use anything else you feel like. I am not working for you, not getting paid for publishing this directive.
I'm forced to use this, it's an old project which use this
Second, if you had, instead of just complaining, did a little search, you will find that the directive is based on ng-repeat and those the performance issues you see arise from ng-repeat.
I did!!! ... and guess what nowhere in documentation is not show how to add track by $index/id, where to add, into directive template, into custom template etc
Third, you can decide and be of use to the community and help improve performance of angular-tree-control. Submit a pool-request with the right tests and docs and we will merge it.
If I find a solution, I will post here what I did. But think again, you think is normal to make a directive good or bad one... with poor documentation!? It's worth to do that? p.s. And I will post full example, not pieces which makes impossible to use it, like I find in your posts!
Have you seen this page? http://wix.github.io/angular-tree-control/
Thanks for the cheerful support, I'm a fan.
Yes, I check official page, but! My template is like:
<treecontrol id="tree-root" class="tree-light" tree-model="poles" select-mode="single" options="treeOptions" on-selection="onSelected(node)" order-by="[alphaBeta, isCellule, label.toLowerCase(), nom.toLowerCase()]" selected-nodes="selectedNodes" expanded-nodes="expandedNodes" filter-expression="filterNodesAndUsers">
<span bo-if="node.isCellule" bo-class="{'search-hit' : isHit(hits, node)}" plus-tree current-node="node" hits="hits" selected-nodes="selectedNodes" should-be-expanded="false">
<span class="badge" bo-if="node.niveau === 'CG'" translate-once="app.labels.cg"></span> {{node.label}}
</span>
<span toggle-user-selected bo-if="!node.isCellule" bo-class="{'search-hit' : isHit(hits, node)}" class="tree-user" should-be-expanded="false">
<span class="icon-user" bo-class="{'icon-user-grey': node.userProfileType == 3}" aria-hidden="true"> </span>{{node.prenom}} {{node.nom}}
</span>
</treecontrol>
..and is harder to make a merge between your example with custom template and what I have, so the easy way is to add track by $index into directive option. So, is in documentation how to do this? Also I want to tell you the problem is with default load (directive stay into modal), not with expand/collapse. Thanks.
Hi, I use your directive into a modal. Everything is ok except in some cases where we have lot of data and then speed problems appears. Is there any way to improve performance? Thank you!