Browse Source
Merge pull request #11028 from maxunbearable/fix/3696-logs-table-rows-jumps
Fixed jumping rows when updating data in Gateway Logs table
pull/11071/head
Vladyslav Prykhodko
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
5 additions and
2 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.html
-
ui-ngx/src/app/modules/home/components/widget/lib/gateway/gateway-logs.component.ts
|
|
|
@ -21,7 +21,7 @@ |
|
|
|
[active]="activeLink.name === link.name"> {{ link.name }} </a> |
|
|
|
</nav> |
|
|
|
<mat-tab-nav-panel #tabPanel></mat-tab-nav-panel> |
|
|
|
<table mat-table [dataSource]="dataSource" |
|
|
|
<table mat-table [dataSource]="dataSource" [trackBy]="trackByLogTs" |
|
|
|
matSort [matSortActive]="pageLink.sortOrder.property" [matSortDirection]="pageLink.sortDirection()" |
|
|
|
matSortDisableClear> |
|
|
|
<ng-container matColumnDef="ts"> |
|
|
|
|
|
|
|
@ -164,6 +164,10 @@ export class GatewayLogsComponent implements AfterViewInit { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
trackByLogTs(_: number, log: GatewayLogData): number { |
|
|
|
return log.ts; |
|
|
|
} |
|
|
|
|
|
|
|
private changeSubscription() { |
|
|
|
if (this.ctx.datasources && this.ctx.datasources[0].entity && this.ctx.defaultSubscription.options.datasources) { |
|
|
|
this.ctx.defaultSubscription.options.datasources[0].dataKeys = [{ |
|
|
|
@ -178,5 +182,4 @@ export class GatewayLogsComponent implements AfterViewInit { |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|