https://jsfiddle.net/v8gme77z/317/
I need the relatedContext inside the onMove function, but it seems that the first drag for every nested list to another returns me the list is undefined.
There is no property list or element property inside relatedContext on the first drag operation within nested draggable components
I need those properties to be defined on the first drag operation.
Is this issue due to the fact that is has a nested list data structure? As simple one dimensional arrays return the expected value on first drag.
Also experiencing this problem!
Could you check using version 2.23.0 solution for issue #603 should fix it.
The problem is always here where we use nested draggable.
The methode "getUnderlyingPotencialDraggableComponent" doesn't return the good component.
I think the problem comes from "vue.$children[0]".
In case of 2 nested draggable, we should use "vue.$children[0].$children[0]"
getUnderlyingPotencialDraggableComponent({ __vue__: vue }) {
if (
!vue ||
!vue.$options ||
!isTransitionName(vue.$options._componentTag)
) {
if (
!("realList" in vue) &&
vue.$children.length === 1 &&
"realList" in vue.$children[0]
)
return vue.$children[0];
return vue;
}
return vue.$parent;
},
@David-Desmaisons, the fix you mention above does not fix the OP bug - it is still happening with 2.23.2. I have the same problem - dragging into another element (nesting) produces an (almost) empty relatedContext object - 'list' is undefined, "index" and "element" are missing, "component" is bogus.
Can you please look at this? I understand you are busy (as you explained in my question about whether Vue.Draggable is still maintained) but the last comment above is from 3 months ago and it clearly states that the problem is still on.
Thank you!
Most helpful comment
Also experiencing this problem!