Vue.Draggable icon indicating copy to clipboard operation
Vue.Draggable copied to clipboard

Integrate MultiDrag plugin from sortablejs

Open kinesias opened this issue 5 years ago • 25 comments

Starting with version 1.9.0, SortableJS allows the user to select and drag multiple items at once with the MultiDrag option. https://github.com/SortableJS/Sortable/wiki/Dragging-Multiple-Items-in-Sortable

Is there a way to use this awesome feature with vuedraggable?

kinesias avatar Jun 03 '19 12:06 kinesias

Starting with version 1.9.0, SortableJS allows the user to select and drag multiple items at once with the MultiDrag option. https://github.com/SortableJS/Sortable/wiki/Dragging-Multiple-Items-in-Sortable

Is there a way to use this awesome feature with vuedraggable?

@ David-Desmaisons How soon will this feature be added?

chengmanxiang avatar Jun 28 '19 09:06 chengmanxiang

@David-Desmaisons With this feature, I had an an idea. I want to replicate this in the react edition too.

Since SortableJS come with the package as a dependency, we could expose Sortable as an export from vuedraggable? That way the user can mount the plugin using the version of sortable from the dependency.

Sortable Plugins Docs shows how easy it is to export. @owen-m1 will MultiDrag be included when sortablejs is added via package manager such as NPM or Yarn?

<script>
import draggable, { Sortable, MultiDrag } from 'vuedraggable';

Sortable.mount(new MultiDrag())

// ... vue component here
</script>

waynevanson avatar Jul 05 '19 12:07 waynevanson

@waynevanson Yes, the plugins are already included in the released 1.10.0-rc versions.

owen-m1 avatar Jul 05 '19 12:07 owen-m1

@owen-m1 The plugins aren't available in the @types/sortablejs, but it does work when mounted. Using modules and Typescript, it looks like you're not importing anything but with enough // @ts-ignore's, it works.

I might make a pull to that repo.

waynevanson avatar Jul 06 '19 00:07 waynevanson

@waynevanson That would be helpful. I have been converting the code to Typescript (not pushed yet) and I will see if it is a viable option. So far it's looking pretty good.

owen-m1 avatar Jul 06 '19 01:07 owen-m1

The implementation of the multidrag feature into this module is not as easy as thought. I've tried to add support using version 1.10.0-rc3 from sortablejs which includes the multidrag plugin. But you have to refactor a whole bunch of methods on vuedraggable.js like almost all onDrag…-callbacks to consider items and clones, the underlying vm, list updates and so on.

rwam avatar Jul 12 '19 07:07 rwam

@rwam I didn't think it would be very simple. Perhaps VueDraggable would need a plugin system similiar to Sortable's.

owen-m1 avatar Jul 12 '19 12:07 owen-m1

@ David-Desmaisons How soon will this feature be added?

chengmanxiang avatar Jul 29 '19 01:07 chengmanxiang

@owen-m1 , Could you please suggest when multidrag feature will be integrated in VueDraggable?

EugenMaevskiy avatar Jul 29 '19 11:07 EugenMaevskiy

@EugenMaevskiy I do not maintain VueDraggable nor do I know anything about it's internals. It is up to @David-Desmaisons or another contributor to add. I think @beljand is trying to implement it.

If nobody wants to add it though I might be able to try, but it might take me a while.

owen-m1 avatar Jul 29 '19 12:07 owen-m1

@EugenMaevskiy @chengmanxiang I am vue.draggable maintainer. I will add multi-drag at some point in the future, but I can not tell you how soon: 1-because I am not sure exactly when I will start 2-because I am not sure about how impacting this will be (but surely it will have a significant impact on the project)

In the meanwhile if someone wants to try to implement this (which I do not recommend due to its high complexity), please enter in contact with me (maybe opening a draft PR) so I can give some guidance.

Once I will start I will follow-up my progress using this issue.

David-Desmaisons avatar Jul 29 '19 17:07 David-Desmaisons

Great. I can also answer any questions pertaining to how the MultiDrag plugin works and it's exact behavior if they arise.

owen-m1 avatar Jul 29 '19 17:07 owen-m1

I would really like to have this feature for Vue draggable too!

noeleo25 avatar Jul 30 '19 22:07 noeleo25

Waiting for the addition of multi-drag feature in Vue.Draggable.

MaheshB0ngani avatar Aug 21 '19 05:08 MaheshB0ngani

Definitely hoping to see this feature appear inside Vue.Draggable! Any thoughts on how to hack the current version to makeshift this feature?

TheDropZone avatar Sep 25 '19 10:09 TheDropZone

Is there any ETA on support for multi-drag in vue draggable? I found examples working with it, but cant get it to work myself..

erdesigns-eu avatar Jun 09 '21 17:06 erdesigns-eu

Is anyone willing fund this? I will contribute.

heyharmon avatar Nov 22 '21 04:11 heyharmon

Guys honestly this is "a matter national security" now :). Can someone guide on how to implement this in 2022?

ignatius-n avatar Jun 23 '22 08:06 ignatius-n

Any progress with this issue?

Emuzex avatar Aug 01 '22 20:08 Emuzex

What about other plugins support? Like in my case I need to inject Swap pluigin somehow

ilearnio avatar Sep 16 '22 11:09 ilearnio

Any progress?

gaetandezeiraud avatar Jan 31 '23 14:01 gaetandezeiraud

Any progress with this issue? <3

NeeeeT avatar Feb 03 '23 07:02 NeeeeT

Any Update on this ?

prasad210 avatar Aug 04 '23 04:08 prasad210

+1

krizskp avatar Aug 04 '23 05:08 krizskp