Resources I've looked at:
https://github.com/valor-software/ng2-dragula
Issues describing similar problems:
https://github.com/valor-software/ng2-dragula/issues/309
https://github.com/valor-software/ng2-dragula/issues/663
I'm using ng2-dragula and I'm trying to have nested draggable items but I cannot for the life of me figure out how to do it despite looking at examples.
This one allows columns to be dragged from one row to another just fine:
<div>
<row *ngFor="let row of rows" dragula="columns" [dragulaModel]="row?.columns">
<column *ngFor="let column of row?.columns"></column>
</row>
</div>
However I also need the rows themselves to be draggable so I did this:
<div dragula="rows" [dragulaModel]="rows">
<row *ngFor="let row of rows" dragula="columns" [dragulaModel]="row?.columns">
<column *ngFor="let column of row?.columns"></column>
</row>
</div>
This allows the rows to be draggable but now the columns doesn't work, if I try to drag a column into another row I get the error:
ERROR DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
The columns also cannot be re-ordered within the same row.
It appears as if dragging a column causes the row to be dragged instead of the column.
What am I doing wrong here?