Skip to content
This repository was archived by the owner on Oct 22, 2020. It is now read-only.
This repository was archived by the owner on Oct 22, 2020. It is now read-only.

how to enable drag and drop functionality with ng-tree  #10

Description

@wolverine99

Having a hard time to find proper support for drag and drop compatible with ng-tree directive , actual model which passed in ng-tree it is not getting updated after drag and drop below is the code with dragula

<ul ng-tree="leftTree.children" ng-hide='treeLoading' data-id="{{item.id}}">            
                <li ng-show="$parent.item.expanded || !$parent.item"
                    ng-class="{active: item.id == selectedObj.id , unselectable:true} " data-id="{{item.id}}" id="item_{{item.id}}"
                     dragula-scope="$parent" dragula='"payrollRepo"'dragula-model="modelDrag"
                     select="selected()">
                    <div >
                        <i id="{{item.id}}"class="pull-left" ng-class="{'icon-gt-collapse': item.expanded && !item.leaf && !item.loading, 'icon-gt-expand': ((!item.expanded && !item.leaf) || item.showPlusIcon) && !item.loading, 'icon-spinner': item.loading, 'icon-spin': item.loading }" ng-click="toggleCollapse(item)"></i> 
                        <a id ="{{item.id}}" ng-click="getItemInfo(item)"  style="font-size:0.85em;"><i ng-class="{'icon-list-alt': item.leaf, 'icon-folder-close': !item.expanded && !item.leaf, 'icon-folder-open': item.expanded && !item.leaf }"></i> <span id ="{{item.id}}"ng-show="item.id > 0">{{item.description}}</span><span ng-show="item.id == 0">New Component</span></a>
                    </div>
                </li>
            </ul> 

Any help would be appreciated. Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions