Handles can serve different purposes.
For example, in the case of drag and drop, instead of
<mat-header-cell
*matHeaderCellDef
(mousedown)="onResizeColumn($event, i)"
cdkDropList
cdkDropListLockAxis="x"
cdkDropListOrientation="horizontal"
(cdkDropListDropped)="dropListDropped($event, i)"
cdkDrag
[cdkDragData]="{ name: column.field, columIndex: i }"
(cdkDragStarted)="dragStarted($event, i)"
>
{{ column.field }}
</mat-header-cell>
You could use:
<mat-header-cell
*matHeaderCellDef
(mousedown)="onResizeColumn($event, i)"
cdkDropList
cdkDropListLockAxis="x"
cdkDropListOrientation="horizontal"
(cdkDropListDropped)="dropListDropped($event, i)"
cdkDrag
[cdkDragData]="{ name: column.field, columIndex: i }"
(cdkDragStarted)="dragStarted($event, i)"
>
{{ column.field }}
<mat-icon cdkDragHandle>drag_handle</mat-icon>
</mat-header-cell>
A similar concept applies to resizing. Instead of:
<mat-header-cell
*matHeaderCellDef
(mousedown)="onResizeColumn($event, i)"
cdkDropList
cdkDropListLockAxis="x"
cdkDropListOrientation="horizontal"
(cdkDropListDropped)="dropListDropped($event, i)"
cdkDrag
[cdkDragData]="{ name: column.field, columIndex: i }"
(cdkDragStarted)="dragStarted($event, i)"
>
{{ column.field }}
<mat-icon cdkDragHandle>drag_handle</mat-icon>
</mat-header-cell>
You could consider using:
<mat-header-cell
*matHeaderCellDef
cdkDropList
cdkDropListLockAxis="x"
cdkDropListOrientation="horizontal"
(cdkDropListDropped)="dropListDropped($event, i)"
cdkDrag
[cdkDragData]="{ name: column.field, columIndex: i }"
(cdkDragStarted)="dragStarted($event, i)"
>
{{ column.field }}
<mat-icon cdkDragHandle>drag_handle</mat-icon>
<mat-icon (mousedown)="onResizeColumn($event, i)">switch_left</mat-icon>
</mat-header-cell>
It might be more beneficial to incorporate handles for both functionalities.
I included mat-icon which requires importing MatIconModule from @angular/material package into your module.
See Edited Version on Stackblitz