Is it possible to use a quasar component with vue draggable?

Viewed 2194

I've been trying to get this done for awhile, but can't seem to get it to work. I'm using the Quasar CLI, and it'd be appreciated if someone could show me an example of how to do this.

<draggable v-model="myList" draggable=".item" tag="q-virtual-scroll">
</draggable>

I've tried using a quasar component by passing in the component in the tag prop, but that doesn't seem to be working. So any advice would be appreciated.

1 Answers

I tried an example from website and it works.

I am using :list="list", but v-model="list" is just another way to declare data. So both work.

<draggable
  :list="list"
  :disabled="!enabled"
  class="list-group"
  ghost-class="ghost"
  @start="dragging = true"
  @end="dragging = false"
>
  <div
    class="list-group-item"
    v-for="element in list"
    :key="element.name"
  >
    {{ element.name }}
  </div>
</draggable>

Draggable is declared like this:

import draggable from 'vuedraggable'

I think you should give entire code, it would help.

Related