How to sort angular material mat table based on a row?, I know we can sort based on columns using mat-sort but the requirement is to sort based on the row when you double click on it.
<ng-container matColumnDef="Measure">
<th mat-header-cell *matHeaderCellDef>Measure</th>
<td mat-sort-header class="bold" mat-cell *matCellDef="let element">
{{ element.name }}
</td>
</ng-container>
Added the mat-sort-header directive to the td instead of th, but getting error - Cannot have two MatSortables with the same id (Measure).
You can use the Material CDK-Table and set any kind of sorting you want. Check out the example from the official docs:
}