I am trying to drag column of a row to another row but it can't drop to another row's column array. I have following type of array ( sample data array ).
[
{ // row
key: value,
cols: [{ key: value }] // cols array
},
//n numers of row
]
My code.
<table id="id">
<tbody sortablejs ngDefaultControl [(ngModel)]="Array">
<tr *ngFor="let item of Array; let i = index">
<td class="myRowClass sort-disabled">
<!-- index logic -->
</td>
<td class="myRowClass sort-disabled">
<!--logic -->
</td>
<td sortablejs>
<div *ngFor="let cell of item.cols" class="divSize">
<!-- column logic -->
</div>
</td>
</tr>
</tbody>
</table>
By using
[sortablejsOptions]="options"
i achieved my functionality.options in .ts file group name must be same.