UI: Fix - remove trackBy from dashboard widgets to recreate widget on config changes.
This commit is contained in:
parent
28986fbf6e
commit
1d63932b2b
@ -66,7 +66,7 @@
|
|||||||
</mat-menu>
|
</mat-menu>
|
||||||
<div [class]="dashboardClass" id="gridster-background">
|
<div [class]="dashboardClass" id="gridster-background">
|
||||||
<gridster #gridster id="gridster-child" [options]="gridsterOpts">
|
<gridster #gridster id="gridster-child" [options]="gridsterOpts">
|
||||||
<gridster-item #gridsterItem [item]="widget" [class]="{'tb-noselect': isEdit}" *ngFor="let widget of dashboardWidgets; trackBy: trackByWidgetId">
|
<gridster-item #gridsterItem [item]="widget" [class]="{'tb-noselect': isEdit}" *ngFor="let widget of dashboardWidgets">
|
||||||
<tb-widget-container
|
<tb-widget-container
|
||||||
[gridsterItem]="gridsterItem"
|
[gridsterItem]="gridsterItem"
|
||||||
[widget]="widget"
|
[widget]="widget"
|
||||||
|
|||||||
@ -558,10 +558,6 @@ export class DashboardComponent extends PageComponent implements IDashboardCompo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public trackByWidgetId(_index: number, widget: DashboardWidget) {
|
|
||||||
return widget.widgetId;
|
|
||||||
}
|
|
||||||
|
|
||||||
private scrollToWidget(widget: DashboardWidget, delay?: number) {
|
private scrollToWidget(widget: DashboardWidget, delay?: number) {
|
||||||
const parentElement = this.gridster.el as HTMLElement;
|
const parentElement = this.gridster.el as HTMLElement;
|
||||||
widget.gridsterItemComponent$().subscribe((gridsterItem) => {
|
widget.gridsterItemComponent$().subscribe((gridsterItem) => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user