Multiple groups with draggable items : drag all group instead of items
Dear all,
Many thanks for this great and very useful package.
I have 2 questions:
- Is it possible to implement dragging of group of items ?
- When moving an item from one group to another, how to handle the previous location of this item within the structure ?
Many thanks in advance for you feedback,
BR David
Is it possible to implement dragging of group of items ?
Yes, it is possible to do this, but it was not documented in the readme file yet. I updated the documentation, you can find it here.
When moving an item from one group to another, how to handle the previous location of this item within the structure ?
What do you mean by this? Do you have an example?
Example: I have a group A with items 1, 2, 3 and a group B with no item I move item 2 from group A to B. How do I know in the result array that 2 is coming from A ? Because on the backend, I have to remove it from A and add it to B.
I hope I made myself clear.
Thanks for help
In your blade file, you know which items belongs to which group, so you should be able to know that in your Livewire component class as well before you process the updated order
Duplicate of https://github.com/nextapps-be/livewire-sortablejs/issues/5