Skip to content

Commit

Permalink
fix(admin-ui): Update active filter preset on back/forward navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Oct 11, 2023
1 parent 58cb5a5 commit 844876e
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import { CdkDragDrop } from '@angular/cdk/drag-drop';
import { ChangeDetectionStrategy, Component, Input, OnDestroy, OnInit } from '@angular/core';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Input,
OnDestroy,
OnInit,
} from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Observable, Subject } from 'rxjs';
import { distinctUntilChanged, map, startWith, takeUntil } from 'rxjs/operators';
Expand All @@ -26,6 +33,7 @@ export class DataTableFilterPresetsComponent implements OnInit, OnDestroy {
private route: ActivatedRoute,
private filterPresetService: FilterPresetService,
private modalService: ModalService,
private changeDetectorRef: ChangeDetectorRef,
) {}
ngOnInit() {
this.route.queryParamMap
Expand All @@ -36,6 +44,7 @@ export class DataTableFilterPresetsComponent implements OnInit, OnDestroy {
)
.subscribe(() => {
this.serializedActiveFilters = this.filters.serialize();
this.changeDetectorRef.markForCheck();
});
this.serializedActiveFilters = this.filters.serialize();

Expand Down

0 comments on commit 844876e

Please sign in to comment.