Commit 39e438c3927ee0e2a6a6d775239f7800c92dfef7
1 parent
9b76d785
Disabled column sort for alarm widget for details key
Showing
2 changed files
with
6 additions
and
1 deletions
... | ... | @@ -78,7 +78,9 @@ |
78 | 78 | </mat-cell> |
79 | 79 | </ng-container> |
80 | 80 | <ng-container [matColumnDef]="column.def" *ngFor="let column of columns; trackBy: trackByColumnDef;"> |
81 | - <mat-header-cell [ngStyle]="headerStyle(column)" *matHeaderCellDef mat-sort-header> {{ column.title }} </mat-header-cell> | |
81 | + <mat-header-cell [ngStyle]="headerStyle(column)" *matHeaderCellDef mat-sort-header [disabled]="isSorting(column)"> | |
82 | + {{ column.title }} | |
83 | + </mat-header-cell> | |
82 | 84 | <mat-cell *matCellDef="let alarm;" |
83 | 85 | [innerHTML]="cellContent(alarm, column)" |
84 | 86 | [ngStyle]="cellStyle(alarm, column)"> | ... | ... |
... | ... | @@ -840,6 +840,9 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit, |
840 | 840 | } |
841 | 841 | } |
842 | 842 | |
843 | + isSorting(column: EntityColumn): boolean { | |
844 | + return column.type === DataKeyType.alarm && column.name.startsWith('details.'); | |
845 | + } | |
843 | 846 | } |
844 | 847 | |
845 | 848 | class AlarmsDatasource implements DataSource<AlarmDataInfo> { | ... | ... |