Skip to content

Is there a way to prevent the placeholder appearing when dragging into root level? #26

@flight9

Description

@flight9

Our project have a constraint that there should only be one node at the root level.
So we use following codes to prevent that happening, it works:

dragEndHook(node) {
  return !node._vm.store.dplh.parent.isRoot; // return false to stop dropping
}

But we found the placeHolder still appears at root level, that may mislead our users by let them think the root level is permitted for node to be dropped.
Is there a way to prevent the placeholder appearing?

version:
vue-draggable-nested-tree 2.1.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions