Browse Source

Merge pull request #4980 from vvlladd28/bug/update-state/clear-params

[3.3.0] UI: Fixed update state: not clear state params
pull/4992/head
Igor Kulikov 5 years ago
committed by GitHub
parent
commit
f614a0a3da
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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