Browse Source

UI: Fix dashboard widgets not refreshing actions after config apply

Restore object-identity tracking (track widget) for the dashboard widget
grid loop. The Angular 20 migration commit ff0e33c07 changed it to
'track widget.widgetId', which stopped the WidgetComponent from being
recreated when doCheck() swaps in a new DashboardWidget on a config edit.
Since widgetContext.customHeaderActions / actionsApi are built only in
ngOnInit, applied action changes did not appear until a full reload.
pull/15923/head
Ruslan 2 months ago
parent
commit
c2a0f8b5d9
  1. 2
      ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.html

2
ui-ngx/src/app/modules/home/components/dashboard/dashboard.component.html

@ -78,7 +78,7 @@
</mat-menu>
<div [class]="dashboardClass" id="gridster-background">
<gridster #gridster id="gridster-child" [options]="gridsterOpts">
@for (widget of dashboardWidgets; track widget.widgetId) {
@for (widget of dashboardWidgets; track widget) {
<gridster-item #gridsterItem [item]="widget" [class]="{'tb-noselect': isEdit}">
<tb-widget-container
[gridsterItem]="gridsterItem"

Loading…
Cancel
Save