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.

has this plugin any incompatibility with vue 2.0?

See original GitHub issue

I’m trying to use this plugin with vue 2.0 and I’m always getting the following error ‘Uncaught Sortable: el must be HTMLElement, and not [object Undefined]’

Any help would be most appreciated. Thanks

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:15
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

75reactions
FrankFangcommented, Feb 13, 2017

Hey guys, the code is so simple, just put this shit into your project and get it work for Vue 2:

import Vue from 'vue'
import Sortable from 'sortablejs'

Vue.directive('sortable', {
  inserted: function (el, binding) {
    new Sortable(el, binding.value || {})
  }
})

Why bother to introduce another lib? Right?

And remember to add keys for your items: https://github.com/vuejs/vue/issues/4085#issuecomment-257673656

Full example by @Ivannnnn

https://jsfiddle.net/1khq32ed/10/

13reactions
kminekcommented, Oct 4, 2016

hi there 😃 finally i managed to get sortable working with vue 2: http://codepen.io/kminek/pen/pEdmoo - maybe it will help to upgrade this plugin 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix a "Vue packages version mismatch" error on ...
0.9 app, I get the following error: Module build failed: Error: Vue packages version mismatch: - vue@2.0.8 - vue-template-compiler@2.2.6 This ...
Read more >
Migration to Vue 2.7
2.7 support for Vite is provided via a new plugin: @vitejs/plugin-vue2. This new plugin requires Vue 2.7 or above and supersedes the existing...
Read more >
Upgrade Guide
Quasar UI v2 is based on Vue 3, as opposed to the previous version which was based on Vue 2. ... You may...
Read more >
vue/compat
Vue 3 compatibility build for Vue 2. ... Vue 3 no longer provides a bundle renderer and it is recommended to use Vue...
Read more >
Vite 3.0 is out!
Today, 16 months from the v2 launch we are happy to announce the release of Vite 3. We decided to release a new...
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