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

no show item when drag

Open matamune94 opened this issue 6 years ago • 6 comments

i use nuxt js and have this bug :

matamune94 avatar Jan 08 '19 21:01 matamune94

@matamune94 I'll need more context, it's not very easy to debug it from just a screencap

Jexordexan avatar Jan 14 '19 02:01 Jexordexan

I just started using vue-slicksort and had this issue myself, so I figured I'd share in case it would help you or anyone else.

What was happening in my case (I'm using Quasar) was when the dragged element gets appended to the body, it was being hidden by elements with a higher z-index, so I defined my own helper class using the "helperClass" prop and gave that class a z-index of 9999. In my case, it actually did require a 4 digit number.

pmooredesigner avatar Feb 26 '19 03:02 pmooredesigner

@pmooredesigner Interesting. I'm also using vue-slicksort in two places in a quasar app. The one that is nested inside a q-card in q-dialog disappears as it is dragged. The other is just is inside a q-step and works as expected.

birchb avatar Apr 11 '19 21:04 birchb

I have the same problem, but I in my case only canvas element be hidden

floydback avatar May 06 '19 08:05 floydback

The problem is with cloneNode method that only clone empty canvas without rendering any content. I solve this with @sort-start

<SlickList
        :lockToContainerEdges="true"
        helperClass="sortHelperJs"
        lockAxis="y"
        :distance="20"
        v-model="list"
        @sort-start="onSortStart($event)"
>
onSortStart(events) {
      let oldCanvas = events.node.querySelector('canvas')
      let newCanvas = document.querySelector('.sortHelperJs canvas')

      var context = newCanvas.getContext('2d')
      context.drawImage(oldCanvas, 0, 0)
    },

sortHelperJs is a hack to find a cloned area. I didn't find better way to do this

floydback avatar May 06 '19 12:05 floydback

@pmooredesigner Yup this was my exact issue as well and I'm using bootstrap-vue. I just simply added a class to my SlickItem component and set its z-index to 9999. Thank you.

johndatserakis avatar Jul 05 '19 01:07 johndatserakis