From b3e6f04b30e42347efee1c902eb2cf270af09397 Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 27 Mar 2022 00:25:27 -0700 Subject: [PATCH] move const --- .../app/components/document-list/document-list.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src-ui/src/app/components/document-list/document-list.component.ts b/src-ui/src/app/components/document-list/document-list.component.ts index ea1fa831d..88338c9f5 100644 --- a/src-ui/src/app/components/document-list/document-list.component.ts +++ b/src-ui/src/app/components/document-list/document-list.component.ts @@ -33,8 +33,6 @@ import { ToastService } from 'src/app/services/toast.service' import { FilterEditorComponent } from './filter-editor/filter-editor.component' import { SaveViewConfigDialogComponent } from './save-view-config-dialog/save-view-config-dialog.component' -const filterQueryVars: string[] = FILTER_RULE_TYPES.map((rt) => rt.filtervar) - @Component({ selector: 'app-document-list', templateUrl: './document-list.component.html', @@ -114,6 +112,10 @@ export class DocumentListComponent implements OnInit, OnDestroy, AfterViewInit { }) }) + const filterQueryVars: string[] = FILTER_RULE_TYPES.map( + (rt) => rt.filtervar + ) + this.route.queryParamMap .pipe(filter((qp) => !this.route.snapshot.paramMap.has('id'))) // only when not on saved view .subscribe((queryParams) => {