Skip to content

Drag And Drop Accross 2 Components #822

@beliveInYouToHelpMe

Description

@beliveInYouToHelpMe

Thank your 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:

Drag me!

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
}
}
}

In my AppModule, I import TreeModule.forRoot().
And in the 2 components that use the lib import TreeModule.

This works fine when the element and the tree are in the same component.
I'm using angular-tree-component 8.5.2, angular 8.2.14.

I've seen that problem was solved in version 6 but it seems that it happens again...

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