Browse Source

feat(admin-ui): Persist dashboard layout to localStorage

Michael Bromley 5 years ago
parent
commit
ace115d0e7

+ 1 - 0
packages/admin-ui/src/lib/dashboard/src/components/dashboard/dashboard.component.ts

@@ -136,6 +136,7 @@ export class DashboardComponent implements OnInit {
                 width: item.width,
                 width: item.width,
             }));
             }));
             this.widgetLayout = this.dashboardWidgetService.getWidgetLayout(newLayoutDef);
             this.widgetLayout = this.dashboardWidgetService.getWidgetLayout(newLayoutDef);
+            this.localStorageService.set('dashboardWidgetLayout', newLayoutDef);
             setTimeout(() => this.changedDetectorRef.markForCheck());
             setTimeout(() => this.changedDetectorRef.markForCheck());
         }
         }
     }
     }