angular-ui-tree/angular-ui-tree

angular ui tree limit max depth

Closed this issue · 2 comments

I want to limit max depth of angular UI tree, i added data-max-depth="2" to ui-tree like this

<div ui-tree id="tree-root" data-max-depth="2">
   <ol ui-tree-nodes ng-model="data" >
      <li ng-repeat="node in data" ui-tree-node ng-include="'nodes_renderer.html'"></li>
   </ol>
</div>

It works for single nodes. but problem is when I take a parent node with some child and drag it under another parent node. it let me to drop it. so in this case i can have 3 level. it look like a bug to me.

am i missing anything?

the problem belongs to version 2.9.0, i got it from npm, look like the npm version is not latest one, i got the latest from bower and the problem solved, anyway pls update the npm repo

npm has been updated and this can be closed.