New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag multiple items at once #1377
Comments
Is it possible to drag multiple projects at a time? I also have this need.Thank you |
@chengmanxiang It is now available on next-version branch. Docs are there too. |
hi i try to use this feature with next-version branch with vuedraggable i have made an example of the error here with on on sortable object standalone when i click on a destroy button i try to destroy my sortable object . https://jsbin.com/nujadeq/edit?html,js,console,output should I create another issue or it is the right place to report the problem here ? |
I have been using the next-version branch and the multi-drag is pretty sweet. I have been using it with VueDraggable and it works well. The only thing I have found is that you have to start dragging in order for the onChoose action to accept all of the items that are active. This appears true even if you query the selectors, the list that is returned is the same as the items in the onChoose event. It would be nice if there were either an onSelect action that returned all of the active items or really just the multidrag elements. It looks like in the code there is a check whether it is dragging to update. I haven't investigated completely but it might be better to always send the multidrag elements. I will likely take a look and might submit a pull request for this. I figure you who know the code would have a better grasp of how this should be implemented. |
@jacobsantos I am going to add this event, but if you need it sooner please feel free to create a pull request. |
@owen-m1 Thanks! I am not sure how long it will take or when you will add it. If it is a few days, then I won't bother. If it is a few weeks, then I will go ahead and submit a pull request. I found a workaround and that is to start multidragging and then drop. This will trigger the onChoose event with all of the active items selected, either onDrop or onDrag. I think onDrag. I will just have a note to start dragging and then drop and then click on the actions. Just the usability of everything else is pretty sweet but it just looks from the user's perspective as if the site is bugged. I thought about handling the selection process myself and realized that was crazy since the library does that job very well. Look at the code, I thought I saw the areas where it could be changed, but as with any library, the owner's vision for a solution could be different from my (possibly and likely) hacked version. |
@jacobsantos I will try to do it tomorrow. |
@jacobsantos The events |
Thanks! That looks even better than I hoped. I will give it a try and
let you know.
…On Sun, Apr 14, 2019, 7:01 PM Owen Mills ***@***.***> wrote:
@jacobsantos <https://github.com/jacobsantos> The events onSelect and
onDeselect have been added in latest commit on next-version branch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1377 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATOPmUJkU5FGuUMVczmoWuk4JUv2zsIks5vg8FEgaJpZM4Xt4bD>
.
|
@owen-m1 Works exactly. I had to update Vue.Draggable to accept the new action. |
When it will be available the release with new features added in next-version branch? |
@marinalozovanu Still a while. I am now looking into making multi dragging and swapping optional plugins rather than built into the main script. But you can use the file currently available on the github branch in the meantime. |
Is next version in broken state ? Getting following when dropping from one source to another. Sortable.js:1576 Uncaught TypeError: Cannot read property '_animationCallbackId' of undefined |
@Soneshdabhi It is supposed to be stable but it may have bugs. I will investigate this bug. |
@Soneshdabhi Solved in 4feb960 |
@owen-m1 Thank you for the updates, this is a fantastic project. @jacobsantos Can you provide an example of multi-select, multi-drag and drop working with Vue Draggable? We have it almost working but receive this error on drop:
|
I forgot how I fixed this. A working example is on the vuedraggable page. You just need to remember that multiDrag is converted to multi-drag, per Vue documentation. <ul>
<draggable multi-drag>
<li>{{ item }}</li>
</draggable>
</ul> @c-mac88 I would also recommend downloading the latest commit, since it is working for me. The multi-drag sortable js has to replace the release sortablejs. Vuedraggable does not require any updates and will accept any new event and attribute to pass to sortablejs. I would need code in order to help. All I did was follow the documentation for vuedraggable, sortablejs and vue documentation. And a lot of experimentation. |
@jacobsantos Thank you for your response! I have been getting better results with some of your suggestions. Here is a JS fiddle I put together that is a stripped down version of our problem: https://jsfiddle.net/oxhvr3ze/6/ If you try to select multiple elements from the column on the right and drag them to the column on the left, it appears that they move. However the array length only changes by one no matter how many you select and drag. If you have a moment please take a look and let me know if you see anything I'm missing. Thanks again! |
@c-mac88 That is weird. Certainly seems like a bug. https://jsfiddle.net/hsfmyb7j/1/ I am not using string groups with my usage. I am using the The second is that if you select the reselect the deselected item, it will clone that item and crash. Nope. Once it keeps the items selected, then it will crash. I believe with my implementation it is deselecting on drop end. I am not sure why it is not deselecting on drop end. The only thing I can suggest is using the EDIT: It does not. |
I was looking for this feature as well so will start testing it out. |
I had been waiting for this feature and I love it!! Thanks so much!!! |
@kinesias There is now a |
When doing straight drag without first selecting the item then the item is not cloned from original list, instead of cloning it is moved from the original list. If I first select the item then it is cloned. Is this a bug? My options: group: {
name: 'element',
pull: 'clone',
put: false // Do not allow items to be put into this list
},
multiDrag: true |
This feature has now been merged into the |
Thanks for the great project.
Right now I am working on the task where I should drag and drop multiple items.
I have checked the documentation, same as the issues thread; however, I have not found any relative info regarding how to drag multiple items same time.
That's why I am wondering whether the library supports the functionality or someone had success to achieve it by using the library.
Thanks
The text was updated successfully, but these errors were encountered: