0

In my @vue/cli 4.0.5 / vuedraggable 2.24.1 I make 2 panels with elements which can be dragged from one panel to other, but not sorted inside 1 panel.

Reading docs here https://github.com/SortableJS/Vue.Draggable I see example:

<draggable
        v-model="list"
        handle=".handle"
        :group="{ name: 'people', pull: 'clone', put: false }"
        ghost-class="ghost"
        :sort="false"
        @change="log"
      >
      <!-- -->
</draggable>

and I expect that defining :sort property and with

dragOptions() {
    return {
        animation: 0,
        group: "description",
        disabled: !this.enable_tasks_dragging,
        ghostClass: "ghost"
    }
},

That result is not I expect : items can dragged from one panel to other and sorted inside 1 panel. How to make not to sort items inside 1 panel?

Thanks!

1 Answer 1

0

On the Github page there is a link for all sortable option https://github.com/SortableJS/Vue.Draggable#all-sortable-options. And you obtain this

Import into your project:

// Default SortableJS
import Sortable from "sortablejs";
import { Sortable, MultiDrag, Swap, OnSpill, AutoScroll } from "sortablejs";

So I think you just have to choose manually the options ( import{...} ) that you want

Sign up to request clarification or add additional context in comments.

1 Comment

I added the import line with options. But If I hide most of options : import { /* Sortable, MultiDrag, Swap, OnSpill, */ AutoScroll } from "sortablejs" I still have sorting inside 1 panel. have I to write these options somerhere else ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.