angular-drag-and-drop-lists
angular-drag-and-drop-lists copied to clipboard
How do I detect if item is being dropped into a container?
Hello,
I have created a call back function which is called by "dnd-drop" attribute.
In this function, I have access to "index". However, I can't see any way of checking if this index is within a container or a root index in the list?
Am I missing something?
kind regards, Sean
Any new ideas?
Best regards, Joe
I would like to know also...
regards, Rob
in your dnd-drop
callback, you can get the event. Inside this event is the path
- if your structure is fixed then you can easily check if it's nested inside a container or not (for example, anything dropped into a container returned true for event.path[4].nodeName === "LI"