Skip to content

Drag and drop across components #376

Closed
@doender

Description

@doender

Thank you for this high quality lib!

I have encountered an issue when dragging an external element to a tree, more specifically when the external element and the tree are in different components.

For example, in the template:

<p [treeDrag]="{name: 'first'}" [treeDragEnabled]="true">Drag me!</p>

And the following relevant part of the tree's options:

actionMapping: {
   mouse: {
      drop: (tree: TreeModel, node: TreeNode, $event: any, { from, to }) => {
          // 'from' is null when dropping element outside component
      }
    }
}

This works fine when the element and the tree are in the same component.
I'm using angular-tree-component 4.0.0, angular 4.2.3 and it happens in both Chrome and Firefox.

Is there a workaround or is dragging across components currently not supported?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions