How can I change Angular Material code below, so that data-table is sorted by \'name\' column, ascending order by default. Arrow (indicating current sort direction) must be
Update for Material (tested with v7.3):
@ViewChild(MatSort) matSort: MatSort; private someMethod(): void { this.matSort.sort({ id: 'columnName', start: 'asc', disableClear: false }); }
This will also update the mat-sort-header's arrow without any workaround
mat-sort-header