From c11f1fb965e89b7aeab7c6e957f649ab93bdd5b1 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Tue, 27 Jul 2021 11:14:09 +0300 Subject: [PATCH] UI: Fixed update state: not clear state params --- .../dashboard-page/states/state-controller.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/states/state-controller.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/states/state-controller.component.ts index 63ad7dbcaf..5acf57095f 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/states/state-controller.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/states/state-controller.component.ts @@ -129,7 +129,8 @@ export abstract class StateControllerComponent implements IStateControllerCompon protected updateStateParam(newState: string, replaceCurrentHistoryUrl = false) { this.currentState = newState; if (this.syncStateWithQueryParam) { - const queryParams: Params = {state: encodeURIComponent(this.currentState)}; + const state = this.currentState ? encodeURIComponent(this.currentState) : this.currentState; + const queryParams: Params = {state}; this.ngZone.run(() => { this.router.navigate( [],