I'm trying to use vue-draggable (https://github.com/SortableJS/Vue.Draggable) for a large list of nested items (an organisational tree).
Since there is a lot of data, the user will need to be able to scroll while dragging.
All options from sortable.js are said to be supported, but I can't figure out how 'autoscroll' should be implemented. https://github.com/SortableJS/Sortable/tree/master/plugins/AutoScroll
I tried:
import draggable from "vuedraggable";
import { Sortable, AutoScroll } from 'sortablejs';
Sortable.mount(new AutoScroll());
and in the template:
<draggable class="dragArea"
tag="ul"
:list="nodes"
:group="{ name: 'g1' }"
:scroll-sensitivity="250"
>
<li class="drag rij" v-for="el in nodes" :key="el.id"
{{ el.code }}
</li>
</draggable>
I get the error that:
_sortablejs.AutoScroll is not a constructor