I want to know if it is possible to have a cell that contains a mat-icon defined as
cdkDragHandle.At the moment it is active on the full row but I just want the single icon to be used as draghandle
This is part of the code I'm using:
<mat-table #table [dataSource]="dataSource" class="mat-elevation-z8"
cdkDropList [cdkDropListData]="dataSource"
(cdkDropListDropped)="dropTable($event)">
<ng-container matColumnDef="Order">
<mat-header-cell *matHeaderCellDef>
Actions
</mat-header-cell>
<mat-cell mat-cell *matCellDef="let element">
<mat-icon class="dragCursor" cdkDragHandle>reorder</mat-icon>
{{element.order}}
<button mat-icon-button (click)="onDeleteClick(element)">
<mat-icon>delete</mat-icon>
</button>
</mat-cell>
</ng-container>
... more column definitions
<mat-header-row *matHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *matRowDef="let row; columns: displayedColumns;" cdkDrag [cdkDragData]="row" cdkDragLockAxis="y"></mat-row>
I also tried to define the draghandle on the mat-cell to no avail. Does anybody know how this can be solved?
Thanks in advance!