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 | 19 | Component, |
20 | 20 | ElementRef, |
21 | 21 | Input, |
22 | - NgZone, | |
23 | 22 | OnInit, |
24 | 23 | QueryList, |
25 | 24 | ViewChild, |
... | ... | @@ -59,7 +58,8 @@ import { |
59 | 58 | getCellStyleInfo, |
60 | 59 | getRowStyleInfo, |
61 | 60 | RowStyleInfo, |
62 | - TableWidgetDataKeySettings, TableWidgetSettings | |
61 | + TableWidgetDataKeySettings, | |
62 | + TableWidgetSettings | |
63 | 63 | } from '@home/components/widget/lib/table-widget.models'; |
64 | 64 | import { Overlay } from '@angular/cdk/overlay'; |
65 | 65 | import { SubscriptionEntityInfo } from '@core/api/widget-api.models'; |
... | ... | @@ -151,7 +151,6 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI |
151 | 151 | |
152 | 152 | constructor(protected store: Store<AppState>, |
153 | 153 | private elementRef: ElementRef, |
154 | - private ngZone: NgZone, | |
155 | 154 | private overlay: Overlay, |
156 | 155 | private viewContainerRef: ViewContainerRef, |
157 | 156 | private utils: UtilsService, |
... | ... | @@ -199,6 +198,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI |
199 | 198 | public onDataUpdated() { |
200 | 199 | this.updateCurrentSourceData(); |
201 | 200 | this.clearCache(); |
201 | + this.ctx.detectChanges(); | |
202 | 202 | } |
203 | 203 | |
204 | 204 | private initialize() { |
... | ... | @@ -291,7 +291,7 @@ export class TimeseriesTableWidgetComponent extends PageComponent implements OnI |
291 | 291 | if (this.actionCellDescriptors.length) { |
292 | 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 | 295 | tsDatasource.dataUpdated(this.data); |
296 | 296 | this.sources.push(source); |
297 | 297 | } |
... | ... | @@ -574,8 +574,7 @@ class TimeseriesDatasource implements DataSource<TimeseriesRow> { |
574 | 574 | private source: TimeseriesTableSource, |
575 | 575 | private hideEmptyLines: boolean, |
576 | 576 | private dateFormatFilter: string, |
577 | - private datePipe: DatePipe, | |
578 | - private ngZone: NgZone | |
577 | + private datePipe: DatePipe | |
579 | 578 | ) { |
580 | 579 | this.source.timeseriesDatasource = this; |
581 | 580 | } |
... | ... | @@ -598,10 +597,8 @@ class TimeseriesDatasource implements DataSource<TimeseriesRow> { |
598 | 597 | catchError(() => of(emptyPageData<TimeseriesRow>())), |
599 | 598 | ).subscribe( |
600 | 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 | } | ... | ... |