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.

Draggable not working on ElementUI tabs

See original GitHub issue

Jsfiddle link

https://jsfiddle.net/fozvq5wn/24/

Step by step scenario

I’m trying to wrap the Tabs from ElementIUI in draggable. My example above is based upon the example for <el-collapse>.

Actual Solution

This moves the whole tab wrapper (ie, all the tabs).

Expected Solution

I would expect this to move the individual tab

Am I doing something stupid or have I found a bug?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
ChuckFieldscommented, Feb 18, 2019

Going off of @charles2hang 's comment. I’ve created a working example.

1reaction
onlunarcommented, Feb 17, 2019

Works like a charm.Just use it like Sortablejs in normal situation not using Vue.

import Sortable from "sortablejs";
......
mounted() {
  let el = document.querySelector(".el-tabs__nav");
  let sortTabs = Sortable.create(el, {
    animation: 200,
    filter: ".el-icon-close"
  });
}
......

However,you’d lose track of the array order like using :list options in vuedraggable since it’s immutable. You’d have to configure some callback for Sortable events,implementing mutation for certain needs. Still,It’s practical to embed Sortable in el-tabs like this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jQuery UI draggable-sortable does not work inside an initially ...
You can use the tabsshow event on the tabs to bind the drag'n'drop stuff, http://jsfiddle.net/kMZPR/1/: function initDnD(event, ui) ...
Read more >
IE7 crashes when draggable is inside of tabs - jQuery UI
I'm using draggable and droppable to move blocks of elements from a div to another. When moved, I want that a clone (ui.draggable.clone(false,...
Read more >
Using the HTML5 Drag and Drop API - web.dev
The HTML5 Drag and Drop API means that we can make almost any element on our page draggable. In this post we'll explain...
Read more >
Tabs - Ant Design
Use react-dnd@15+ to make tabs draggable.
Read more >
Drag element onto dynamic subpanel doesn't work | Justinmind Q&A
Hi Warren,. If you're using an 'insert into' event it should work. Can you attach the prototype here in .zip format so we...
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