Browse Source
Merge pull request #9125 from ArtemDzhereleiko/AD/bug-fix/dashboard-page/exit-guard
Fixed showing exit dialog twice on dashboard page
pull/9136/head
Igor Kulikov
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
4 additions and
2 deletions
-
ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts
|
|
@ -161,12 +161,14 @@ import { HasDirtyFlag } from '@core/guards/confirm-on-exit.guard'; |
|
|
}) |
|
|
}) |
|
|
export class DashboardPageComponent extends PageComponent implements IDashboardController, HasDirtyFlag, OnInit, AfterViewInit, OnDestroy { |
|
|
export class DashboardPageComponent extends PageComponent implements IDashboardController, HasDirtyFlag, OnInit, AfterViewInit, OnDestroy { |
|
|
|
|
|
|
|
|
|
|
|
private forcePristine = false; |
|
|
|
|
|
|
|
|
get isDirty(): boolean { |
|
|
get isDirty(): boolean { |
|
|
return this.isEdit; |
|
|
return this.isEdit && !this.forcePristine; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
set isDirty(value: boolean) { |
|
|
set isDirty(value: boolean) { |
|
|
|
|
|
this.forcePristine = !value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
authState: AuthState = getCurrentAuthState(this.store); |
|
|
authState: AuthState = getCurrentAuthState(this.store); |
|
|
|