Alfred-Skyblue / vue-draggable-plus

Universal Drag-and-Drop Component Supporting both Vue 3 and Vue 2
https://vue-draggable-plus.pages.dev/en/
MIT License
2.71k stars 106 forks source link

with onUpdate, onAdd can we get index or item as argument to event #134

Open prashantnirgun opened 1 month ago

prashantnirgun commented 1 month ago

I have to maintain visible and invisible column list, any column can eighter be visible or invisible. array is as follows

const categoryColumns = [
  {
    name: 'category_name',
    label: 'Category Name',
    display: { visible: true, required: true, index: 0 },
    sort: { order: 'Desc', index: 0, sortable: true },
  },
  {
    name: 'slug',
    label: 'Slug',
    display: { visible: true, required: false, index: 1 },
    sort: { order: 'Desc', index: 0, sortable: true },
  },
]

Once the column is added, removed or updated I have to update its display attribute and index e.g. display: { visible: true, required: true, index: 1 } Is there any way I can update the properties. And there are few columns which are always required I just want them permanently in visibleColumn in short not draggable. Here in this case required property

I am using Dual List Drag and Drop and as Component Usage.