question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to customize dragging item's style

See original GitHub issue
"vue": "^2.6.10",
"vuedraggable": "^2.23.2",
"vuetify": "^2.2.21",

Step by step scenario

I’m trying to customize the element that is actually being dragged (not the ghost one) but couldn’t manage to do so. I’m using this options variable :

:options="draggableTicketOptions" on my draggable elements, which contains :

draggableTicketOptions: {
        group: 'tickets',
        chosenClass: 'chosen-ticket',
        dragClass: 'dragging-ticket',
        ghostClass: 'ghost-ticket',

      }

However the dragging-ticket doesn’t seem to apply.

See the whole code :

      <draggable
        :options="draggableTicketOptions"
        :list="stage.ticketIds"
        @change="changeTicketStage($event, stage)"
        class="list-group">
        <v-card
          v-for="ticket in stage.ticketIds"
          :key="ticket.id"
          class="list-group-item ticket-card"
          outlined>
          <v-card-title class="subtitle-2">{{ ticket.name }}</v-card-title>
        </v-card>
      </draggable>

(v-card is a Vuetify element) (by the way I’m trying to rebuild a design such as this one : LINK)

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
kolaentecommented, Jul 28, 2021

Any news on this? It looks like this still doesn’t work.

There’s a few issues about this: https://github.com/SortableJS/Vue.Draggable/issues/780 https://github.com/SortableJS/Vue.Draggable/issues/983 https://github.com/SortableJS/Vue.Draggable/issues/802

@David-Desmaisons Do you maybe have an idea?

1reaction
David-Desmaisonscommented, Nov 13, 2020

Try:

<draggable
        group="tickets"
        chosenClass="chosen-ticket"
        dragClass="dragging-ticket"
        ghostClass="ghost-ticket"
        :list="stage.ticketIds"
        @change="changeTicketStage($event, stage)"
        class="list-group">
Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to change the dragged item on drop - Stack Overflow
I've edited the Dropped() function so that it moves all old elements that where on the body back to their parent and then...
Read more >
Turn on three finger drag for your Mac trackpad - Apple Support
Turn on “Use trackpad for dragging” (or “Enable dragging”). From the pop-up menu, choose the “three finger drag” dragging style.
Read more >
Drag'n'Drop with mouse events - The Modern JavaScript Tutorial
On mouseup we can intellectually finalize the drop: change data, move elements around. We can highlight the elements we're flying over. We can ......
Read more >
Drag–and–Drop: How to Design for Ease of Use
First, make sure that your handle icon is keyboard accessible with the Tab key; this enables “grabbing” the draggable item via the spacebar....
Read more >
HTMLElement: drag event - Web APIs | MDN
The drag event is fired every few hundred milliseconds as an element or ... prevent default action (open as link for some elements)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found