Open
Description
I have trouble getting the new array list.
here is my code
<template>
<div>
<Sortable :list="elements" item-key="id" tag="div" :options="options" @change="DragableData($event)">
<template #item="{ element, index }">
<div :key="element.id">
{{ index }} - {{ element.name }}
</div>
</template>
</Sortable>
</div>
</template>
<script setup>
const elements = [
{ id: "1", name: "one" },
{ id: "2", name: "two" },
{ id: "3", name: "three" },
{ id: "4", name: "four" },
];
const options = {sort: true};
function DragableData(data) {
console.log(data)
}
</script>
data here does not have any array in it. is it possible to get new array?
Metadata
Metadata
Assignees
Labels
No labels