From 509cea087f4776d0d5dca57580d8100f05147010 Mon Sep 17 00:00:00 2001 From: Giuseppe Digilio Date: Thu, 6 Jun 2019 15:02:42 +0200 Subject: [PATCH] when iterate over selected values, retrieve facet value from getFacetValue method --- .../search-facet-filter/search-facet-filter.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts b/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts index 772240eb0b..ee980a0599 100644 --- a/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts +++ b/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts @@ -1,12 +1,12 @@ import { - combineLatest as observableCombineLatest, - of as observableOf, BehaviorSubject, + combineLatest as observableCombineLatest, Observable, + of as observableOf, Subject, Subscription } from 'rxjs'; -import { switchMap, distinctUntilChanged, map, take, flatMap, tap } from 'rxjs/operators'; +import { distinctUntilChanged, map, switchMap, take, tap } from 'rxjs/operators'; import { animate, state, style, transition, trigger } from '@angular/animations'; import { Component, Inject, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; @@ -137,7 +137,7 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy { this.selectedValues$ = this.filterService.getSelectedValuesForFilter(this.filterConfig).pipe( map((selectedValues) => { return selectedValues.map((value: string) => { - const fValue = [].concat(...rd.payload.map((page) => page.page)).find((facetValue: FacetValue) => facetValue.value === value); + const fValue = [].concat(...rd.payload.map((page) => page.page)).find((facetValue: FacetValue) => this.getFacetValue(facetValue) === value); if (hasValue(fValue)) { return fValue; }