ng2-dragula
ng2-dragula copied to clipboard
[usage question] Infinite nesting of drag/drop zones
REQUIRED: Before filing a usage question
- [x] My issue title starts with
[usage question] - [x] I have read the README, especially the 'classic blunders' section
- [x] I have looked at the demos to see if my use case has obvious examples.
- [x] I have searched the
ng2-dragulaissues, including closed issues. - [x] I have browsed the issues labeled "future reference" for problems that have been solved before.
Use case description (required) I would like to have infinite nesting using dragula. I can only figure out how to achieve one layer of nesting. See stackblitz example
Can you show a demo, or a picture of what you want to achieve?
I'd like to achieve infinite nesting of components in the following example
Additional context
https://stackblitz.com/edit/angular-nq5ld2
Hi @MathiasStrohkirch , you can go infinite using this sample:
`<div class="wrapper" dragula="COLUMNS" [(dragulaModel)]="groups"> <div class="container" *ngFor="let group of groups"> {{group.name}} <div class="container" dragula="ITEMS" [(dragulaModel)]="group.items"> <div *ngFor="let item of group.items" [innerHtml]="item.name">
export class NestedComponent {
constructor(private dragulaService: DragulaService) { this.dragulaService.createGroup("COLUMNS", { direction: 'horizontal', moves: (el, source, handle) => handle.className === "group-handle" }); }
public groups:Array