SortableJS / Vue.Draggable

Vue drag-and-drop component based on Sortable.js
https://sortablejs.github.io/Vue.Draggable/
MIT License
19.92k stars 2.89k forks source link

Integrate MultiDrag plugin from sortablejs #649

Open kinesias opened 5 years ago

kinesias commented 5 years ago

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?

chengmanxiang commented 5 years ago

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?

waynevanson commented 5 years ago

@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>
owen-m1 commented 5 years ago

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

waynevanson commented 5 years ago

@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.

owen-m1 commented 5 years ago

@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.

rwam commented 5 years ago

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.

owen-m1 commented 5 years ago

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

chengmanxiang commented 4 years ago

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

EugenMaevskiy commented 4 years ago

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

owen-m1 commented 4 years ago

@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.

David-Desmaisons commented 4 years ago

@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.

owen-m1 commented 4 years ago

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

noeleo25 commented 4 years ago

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

MaheshB0ngani commented 4 years ago

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

TheDropZone commented 4 years ago

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

erdesigns-eu commented 3 years ago

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..

heyharmon commented 2 years ago

Is anyone willing fund this? I will contribute.

ignatius-n commented 2 years ago

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

Emuzex commented 1 year ago

Any progress with this issue?

ilearnio commented 1 year ago

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

gaetandezeiraud commented 1 year ago

Any progress?

NeeeeT commented 1 year ago

Any progress with this issue? <3

prasad210 commented 11 months ago

Any Update on this ?

krizskp commented 11 months ago

+1

derwaldgeist commented 1 month ago

I would need this, too. At least, I would need a way to select items via Shift-Click and Ctrl-Click in addition to being able to drag & drop them.