Merge pull request #418 from 4Science/issue-#416

Fix #416
This commit is contained in:
Art Lowel
2019-06-06 17:35:44 +02:00
committed by GitHub

View File

@@ -1,12 +1,12 @@
import { import {
combineLatest as observableCombineLatest,
of as observableOf,
BehaviorSubject, BehaviorSubject,
combineLatest as observableCombineLatest,
Observable, Observable,
of as observableOf,
Subject, Subject,
Subscription Subscription
} from 'rxjs'; } 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 { animate, state, style, transition, trigger } from '@angular/animations';
import { Component, Inject, OnDestroy, OnInit } from '@angular/core'; import { Component, Inject, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@@ -137,7 +137,7 @@ export class SearchFacetFilterComponent implements OnInit, OnDestroy {
this.selectedValues$ = this.filterService.getSelectedValuesForFilter(this.filterConfig).pipe( this.selectedValues$ = this.filterService.getSelectedValuesForFilter(this.filterConfig).pipe(
map((selectedValues) => { map((selectedValues) => {
return selectedValues.map((value: string) => { 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)) { if (hasValue(fValue)) {
return fValue; return fValue;
} }