When I console log the dropped and dragged node from event onDrop the dropped element is always the closest node and never undefined or null as it should be when dragging to root of the tree.
See stackblitz example made from official blitz and added onDrop method.
https://stackblitz.com/edit/primeng-tre ... mponent.ts
How can I see if the node is dropped on the tree root?
p-tree unable to drag to root
Same issue.
Has anyone found solution?
event.index is always equal to that of event.dropNode, no matter if we drop into it, or above it (next to).
For this reason validating is impossible because we can't differentiate between the 2 operations.
IMO: event.index should be undefined when dropping into something.
Has anyone found solution?
event.index is always equal to that of event.dropNode, no matter if we drop into it, or above it (next to).
For this reason validating is impossible because we can't differentiate between the 2 operations.
IMO: event.index should be undefined when dropping into something.
-
- Information
-
Who is online
Users browsing this forum: No registered users and 37 guests