-
Notifications
You must be signed in to change notification settings - Fork 534
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
Add Multidrag and Swap plugin support #153
base: master
Are you sure you want to change the base?
Conversation
@Trojan0523 are you able to provide some code or a jsbin sample that shows the error? I have not seen either of these errors during my testing or production use. |
@david-mohr sorry for that, i mount multiDrag plugin in my component twice, it`s my fault, your code is fully successful, thumbs up |
Any progress on this? Looking forward to be able to use the |
I haven't had any feedback from the maintainers. Perhaps @David-Desmaisons could please take a look? |
When swap=true the animation property (on draggable component) does not work.
|
@YahorDanchanka It looks like all the animation logic is being applied, so it must be something to do with the way I handle the HTML elements. I'll try to find some time next week to see if I can fix it |
@YahorDanchanka I've investigated the animation issue and I think I have a solution. Could you please try this out and see if it addresses your use case? https://github.com/david-mohr/vue.draggable.next/tree/animation Please note, this is an incomplete update, I'm just testing a theory on how vue and sortable interact |
Unfortunately, it doesn't work for me.
From package.json url of vuedraggable: |
try both <swap="true"> and <:swap="true"> , i.e. with/out ":" |
Hmm, not working for me, sorting still happening. |
strange... how are you running the test? I recommend using |
I just download the raw code into a VS Code project, which is scaffolded with Vite. Dependencies are listed in my post above (installed with npm not yarn). Sorry, but I don't understand "using yarn serve from the root of the repo " |
if you clone my branch into a new folder and then open a terminal:
It should automatically open a new browser tab with the example project running. |
Thanks for help. I didn't have yarn installed; after I installed it I had an error 'vue-cli-service is not recognized' ; tried to install that and had a ton of errors..... I need an example that will run in VSCode. |
Are you sure about this? On github it has |
Any chance this is integrated upstream? |
Hi everyone,
(single-drag with clone and multi-drag without clone works perfectly fine) |
@wayanbray I haven't done any testing with clone and multi-drag, sorry, but I would have expected it to work. I vaguely remember this error popping up in another thread. I'll see if I can find some time to check it out. |
Thank you for your reply @david-mohr.
Multi-elements clone data are saved in evt.clones instead of evt.clone for single elements. Thank you very much for your work on this plugin. |
@wayanbray awesome, thanks! I've committed the patch |
May I ask, has this PR not been merged into vue.draggable.next yet? |
I've been stuck with a question for a long time. I'm using the swap feature of SortableJS in nuxt3, but after the swap, I update the responsive data that was used to swap, however, the data in the page is in the wrong order! Has anyone else encountered the same problem, I'd appreciate a reply! |
no, not merged. I'm not sure it ever will be. I haven't used swap ever, but generally if data is not updating on the page, it's a reactivity problem. In vue, that might mean you need create and assign a new array rather than reusing existing ones. |
@david-mohr thank you for this. |
@david-mohr have you heard back from @David-Desmaisons? If not, it might make sense to fork this. |
No word from the original maintainers. I would potentially fork this, but right now I am only getting this going so I can use it in my day job. @handhikadj multiDrag works just like the upstream sortable project (as does swap). There are worked examples of each in the |
when can we get this merged?? its been over two years 😭 |
|
@duoluodexiaoxiaoyuan You can simply reference my git repo and branch in your package.json.
|
i know, thank you |
sorry, recently i find a problem I want to debug souce code, how i do it. I edit souce code in my project, it's don't effective. How i do it. |
@duoluodexiaoxiaoyuan you need to compile your changes:
Be aware though, you might run into this depending on your node version: https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported |
This is how I understand it. Do I execute npm run build, and then copy the files in the generated dist directory to node_modules? |
i meet a error |
Big thanks to @divinespear for the original Multidrag support in vue.draggable (SortableJS/Vue.Draggable#1052).
I've ported it to Vue 3 (vue.draggable.next). I've also added support for the Swap plugin!