vue-slicksort icon indicating copy to clipboard operation
vue-slicksort copied to clipboard

[Bug] List with distance prop will allow dragging item from any position

Open vinchilive opened this issue 2 years ago • 0 comments

Steps:

  1. set distance="1"
  2. click on the item
  3. move mouse to another position and start dragging

https://user-images.githubusercontent.com/4738878/158062011-ad655dfd-072f-4d20-9b84-4008b042c805.mp4

<template>
  <div class="flex gap-2 m-4">
    <SlickList
      class="w-32 flex flex-col gap-2"
      helper-class="bg-opacity-70"
      v-model:list="list"
      :distance="1"
    >
      <SlickItem
        class="p-2 bg-blue-500 text-white"
        v-for="(item, index) of list"
        :key="item"
        :index="index"
        >{{ item }}</SlickItem
      >
    </SlickList>
  </div>
</template>

<script setup>
import { ref } from 'vue';
import { SlickList, SlickItem } from 'vue-slicksort';

const list = ref([1, 2, 3]);
</script>

vinchilive avatar Mar 13 '22 13:03 vinchilive