Browse Source

UI: Fixed update state: not clear state params

pull/4980/head
Vladyslav_Prykhodko 5 years ago
parent
commit
c11f1fb965
  1. 3
      ui-ngx/src/app/modules/home/components/dashboard-page/states/state-controller.component.ts

3
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(
[],

Loading…
Cancel
Save