Pass the TreeNode to the moveNode event
See original GitHub issueSo when moving nodes when drag/drop I want to check the level of the node. When the level is larger than 1 I don’t want it to be allowed to drag n drop.
I’m implementing this via the onMoveNode($event)
but index always give back 0. Even if i go 4 levels deep or something.
plnkr from template: https://plnkr.co/edit/rTcyb9?p=preview
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
WPF MVVM Treeview move node - Stack Overflow
my goal is to create a treeview with movable node. ... Handling UI events using commands inside the view model is an anti-pattern...
Read more >Drag & Drop - Getting Started
It receives a TreeNode object, and should return a node object (only the data). ... moveNode events and get the moved node, and...
Read more >TreeView.AfterCheck Event (System.Windows.Forms)
This code requires that you have a Form with a TreeView that has TreeNode objects in its TreeNodeCollection. The TreeNodeCollection should have tree...
Read more >Properties, Methods and Events of ejTreeView Widget
The TreeView can be easily configured with the DOM element, ... except the hidden nodes then we need to pass excludeHiddenNodes as true...
Read more >JSDoc: Widget: treeView
The original event is passed to the treeView#contextMenuAction ... See treeNodeAdapter#moveNodes, and treeNodeAdapter#copyNodes for how the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have had a similar issue. The
to
passed in the $event seems to be “detached” from the tree. My work-around has been to find the node in the treeModel & get its level or other properties from there:Reopening for repoholder to see.
To summ it up: @adamkleingit :
' I think what could be helpful is to pass the TreeNode in addition to the node data - and then you can get the level.'