Fixed unclean state when changing the dashboard

This commit is contained in:
Vladyslav_Prykhodko 2020-08-26 12:49:37 +03:00
parent d166be02ca
commit bdaea076f5

View File

@ -623,6 +623,7 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC
public currentDashboardIdChanged(dashboardId: string) { public currentDashboardIdChanged(dashboardId: string) {
if (!this.widgetEditMode) { if (!this.widgetEditMode) {
this.dashboardCtx.stateController.cleanupPreservedStates();
if (this.currentDashboardScope === 'customer' && this.authUser.authority === Authority.TENANT_ADMIN) { if (this.currentDashboardScope === 'customer' && this.authUser.authority === Authority.TENANT_ADMIN) {
this.router.navigateByUrl(`customers/${this.currentCustomerId}/dashboards/${dashboardId}`); this.router.navigateByUrl(`customers/${this.currentCustomerId}/dashboards/${dashboardId}`);
} else { } else {