Skip to content

[Bug] Dragging possible even if disabled #150

Closed
@aimeos

Description

@aimeos

Drag/drop is possible in Draggable trees even if it's disabled by :disableDrag="true" or :eachDraggable="<fcn>" returning false for each node.

When trying to drag a children of the root node the first time, it doesn't work but if you try a second time, it will be possible. When dropping the dragged node, it will vanish.

Example code:

<template>
  <Draggable ref="tree" v-model="treeData" :disableDrag="true" />
</template>

<script>
  import { Draggable, dragContext } from '@he-tree/vue'
  import '@he-tree/vue/style/default.css'

  export default {
    components: { Draggable },
    data() {
      return {
        treeData: [
          {
            text: 'Projects',
            children: [
              {
                text: 'Frontend',
              },
              {
                text: 'Backend',
              },
            ],
          },
        ],
      }
    },
  }
</script>

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