You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i want to enable dragging for only first first level nested elements (i did it with class)
i want to lock dragging elements to top level of array, dragged element should be dropped only inside parent (another element from top level of array)
elements: [ //top level, i dont want to allow drop here
{
id: 1,name: "Shrek",elements: [] //here should be possible to drop
},
{
id: 2,name: "Fiona",elements: [ //elements from here should be draggable (i did it with class)
{
id: 4,name: "Lord Farquad",elements: []
},
{
id: 5,name: "Prince Charming",elements: []
}
]
},
{
id: 3,name: "Donkey",elements: [] //here should be possible to drop
}
]}
Actual Solution
when im dragging element under element from top level of array its ok, then related context is array from top level, but when i want to drag element in the same row as top level element (should be not allowed) related context is also element from level 1, i tried do some copmaring in :on-move, but its called a lot of times and performance is dying
Expected Solution
allow drop elements only under elements from top level of array, lock dragging element to top level of array
The text was updated successfully, but these errors were encountered:
Hi,
i need advice how to achieve
Code: https://github.com/SortableJS/vue.draggable.next/blob/master/example/components/nested/nested-test.vue
Step by step scenario
i want to enable dragging for only first first level nested elements (i did it with class)
i want to lock dragging elements to top level of array, dragged element should be dropped only inside parent (another element from top level of array)
Actual Solution
when im dragging element under element from top level of array its ok, then related context is array from top level, but when i want to drag element in the same row as top level element (should be not allowed) related context is also element from level 1, i tried do some copmaring in :on-move, but its called a lot of times and performance is dying
Expected Solution
allow drop elements only under elements from top level of array, lock dragging element to top level of array
The text was updated successfully, but these errors were encountered: