Skip to content

cant move drag items from one list to another #5

@theSilverFisch

Description

@theSilverFisch

I managed to set up two virtual lists which can also be sorted already. But apparently I can't move items between two lists even if I have them configured to be in the same group. The Sorting, also it works visually, does not trigger the set function in my computed vue variable which is the data-source for the virtual list. My simplified Setup is the following.

template:

<td>                
   <virtual-list class="virtualScroller" :keeps="10" :size="150"
                  :group="{ name: 'group', put: true, pull: true }"
                  :data-key="'docUUID'" 
                  :data-source="batchOne" 
                  :chosen-class="chosen"
                   :draggable="'#drag'">
                  <template v-slot:item="{ record, index, dataKey }">
                    {{ index }}
                    <someComponent id="drag" />
                  </template>
   </virtual-list>
</td>
<td>                
   <virtual-list class="virtualScroller" :keeps="10" :size="150"
                  :group="{ name: 'group', put: true, pull: true }"
                  :data-key="'docUUID'" 
                  :data-source="batchTwo" 
                  :chosen-class="chosen"
                   :draggable="'#drag'">
                  <template v-slot:item="{ record, index, dataKey }">
                    {{ index }}
                    <someComponent id="drag" />
                  </template>
   </virtual-list>
</td>

vue:

const batchTwo = computed( {
  return {
    get() {
      return items.value.query.vScrollItems.filter(item => {
        if (item.isBatchOne) return false
        return true
      })
    },
    set(newValue) {
      debugger
    },
  }
})
const batchOne =computed( {
  return {
    get() {
      return items.value.query.vScrollItems.filter(item => {
        if (item.isBatchTwo) return false
        return true
      })
    },
    set(newValue) {
      debugger
    },
  }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions