Skip to content Skip to sidebar Skip to footer

Angular 8 Nested Drag And Drop

unfortnually I can't find a solution in a common problem. Here is the link to the code https://stackblitz.com/edit/angular-ygwaxs I've got this scenario: from the server I got a js

Solution 1:

I also had a problem with nested dragdrop/sorting items in a tree structure recently.

The solution for me was to link the different cdkDropLists via cdkDropListConnectedTo and to get the target drop position through the cdkDragMoved event on the cdkDrag items.

Demo: https://stackblitz.com/edit/angular-cdk-nested-drag-drop-tree-structure

Solution 2:

you could use sortable js Nested Sortables: https://sortablejs.github.io/Sortable/#nested

There is also an angular implemantation of sortable js: https://github.com/SortableJS/ngx-sortablejs

Solution 3:

There's an article for sortable, nested, drag&drop lists. It also includes a working stackblitz demo using only @angular/cdk

https://sienakasa.medium.com/angular-cdk-nested-drag-and-drop-d849365a7ca9

Post a Comment for "Angular 8 Nested Drag And Drop"