Commit 24446376bcd5e96b98906d58c2ac30980ba183b6
1 parent
cb03cf74
UI: Fixed not updating data in Timeseries table in full screen mode
Showing
1 changed file
with
7 additions
and
10 deletions
@@ -19,7 +19,6 @@ import { | @@ -19,7 +19,6 @@ import { | ||
19 | Component, | 19 | Component, |
20 | ElementRef, | 20 | ElementRef, |
21 | Input, | 21 | Input, |
22 | - NgZone, | ||
23 | OnInit, | 22 | OnInit, |
24 | QueryList, | 23 | QueryList, |
25 | ViewChild, | 24 | ViewChild, |
@@ -59,7 +58,8 @@ import { | @@ -59,7 +58,8 @@ import { | ||
59 | getCellStyleInfo, | 58 | getCellStyleInfo, |
60 | getRowStyleInfo, | 59 | getRowStyleInfo, |
61 | RowStyleInfo, | 60 | RowStyleInfo, |
62 | - TableWidgetDataKeySettings, TableWidgetSettings | 61 | + TableWidgetDataKeySettings, |
62 | + TableWidgetSettings | ||
63 | } from '@home/components/widget/lib/table-widget.models'; | 63 | } from '@home/components/widget/lib/table-widget.models'; |
64 | import { Overlay } from '@angular/cdk/overlay'; | 64 | import { Overlay } from '@angular/cdk/overlay'; |
65 | import { SubscriptionEntityInfo } from '@core/api/widget-api.models'; | 65 | import { SubscriptionEntityInfo } from '@core/api/widget-api.models'; |
@@ -151,7 +151,6 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI | @@ -151,7 +151,6 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI | ||
151 | 151 | ||
152 | constructor(protected store: Store<AppState>, | 152 | constructor(protected store: Store<AppState>, |
153 | private elementRef: ElementRef, | 153 | private elementRef: ElementRef, |
154 | - private ngZone: NgZone, | ||
155 | private overlay: Overlay, | 154 | private overlay: Overlay, |
156 | private viewContainerRef: ViewContainerRef, | 155 | private viewContainerRef: ViewContainerRef, |
157 | private utils: UtilsService, | 156 | private utils: UtilsService, |
@@ -199,6 +198,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI | @@ -199,6 +198,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI | ||
199 | public onDataUpdated() { | 198 | public onDataUpdated() { |
200 | this.updateCurrentSourceData(); | 199 | this.updateCurrentSourceData(); |
201 | this.clearCache(); | 200 | this.clearCache(); |
201 | + this.ctx.detectChanges(); | ||
202 | } | 202 | } |
203 | 203 | ||
204 | private initialize() { | 204 | private initialize() { |
@@ -291,7 +291,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI | @@ -291,7 +291,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI | ||
291 | if (this.actionCellDescriptors.length) { | 291 | if (this.actionCellDescriptors.length) { |
292 | source.displayedColumns.push('actions'); | 292 | source.displayedColumns.push('actions'); |
293 | } | 293 | } |
294 | - const tsDatasource = new TimeseriesDatasource(source, this.hideEmptyLines, this.dateFormatFilter, this.datePipe, this.ngZone); | 294 | + const tsDatasource = new TimeseriesDatasource(source, this.hideEmptyLines, this.dateFormatFilter, this.datePipe); |
295 | tsDatasource.dataUpdated(this.data); | 295 | tsDatasource.dataUpdated(this.data); |
296 | this.sources.push(source); | 296 | this.sources.push(source); |
297 | } | 297 | } |
@@ -574,8 +574,7 @@ class TimeseriesDatasource implements DataSource<TimeseriesRow> { | @@ -574,8 +574,7 @@ class TimeseriesDatasource implements DataSource<TimeseriesRow> { | ||
574 | private source: TimeseriesTableSource, | 574 | private source: TimeseriesTableSource, |
575 | private hideEmptyLines: boolean, | 575 | private hideEmptyLines: boolean, |
576 | private dateFormatFilter: string, | 576 | private dateFormatFilter: string, |
577 | - private datePipe: DatePipe, | ||
578 | - private ngZone: NgZone | 577 | + private datePipe: DatePipe |
579 | ) { | 578 | ) { |
580 | this.source.timeseriesDatasource = this; | 579 | this.source.timeseriesDatasource = this; |
581 | } | 580 | } |
@@ -598,10 +597,8 @@ class TimeseriesDatasource implements DataSource<TimeseriesRow> { | @@ -598,10 +597,8 @@ class TimeseriesDatasource implements DataSource<TimeseriesRow> { | ||
598 | catchError(() => of(emptyPageData<TimeseriesRow>())), | 597 | catchError(() => of(emptyPageData<TimeseriesRow>())), |
599 | ).subscribe( | 598 | ).subscribe( |
600 | (pageData) => { | 599 | (pageData) => { |
601 | - this.ngZone.run(() => { | ||
602 | - this.rowsSubject.next(pageData.data); | ||
603 | - this.pageDataSubject.next(pageData); | ||
604 | - }); | 600 | + this.rowsSubject.next(pageData.data); |
601 | + this.pageDataSubject.next(pageData); | ||
605 | } | 602 | } |
606 | ); | 603 | ); |
607 | } | 604 | } |