I'm working on a project where i think Vue Draggable is the best solution for what i want to do which is to drag an item from one table and drop it in another. I have been following Andre Madarang video and i have most of it working. I can move thing around within each table but i cannot grab from one and drop in the other, here is the code:
I have been working on this the entire morning and i'm getting there. I started from scratch using one of the samples from the vue.draggable web site. Then added and replace things to make it in to a couple of tables and i can move elements from one table to another. Now my problem is when the table is empty or becomes empty, then it does not accept an element. The documentation calls to give the element a minimum height, as you can see in the code below i have been adding the min-height everywhere but it doesn't work. My first attempt was to put the min-height on the draggable element, that did not work. Thanks for any ideas you may have:
Thanks for the answer, right i'm starting with both tables with some data. The problem becomes when one of the tables gets empty. It seems to me a lot of programming to keep checking when one of the tables becomes empty, to then add a empty row there. Also i think that row will need to be made non-draggable.
I will post on the vue draggable site a issue, and see what the response is. In the mean time i think i will make the tables into lists, which seem to be working
@DAN3460 - Could you explain this solution a little more? I am experiencing the same problem. I have put the min-height CSS option on dragArea, but when I look at the element in the browser console, it tells me the dragArea is 0x0 on an empty list. I tried including the dragArea in the class of my draggable component (a table row), but that did not change anything.