I have two subscriptions item as you see in the image:

one of them is search input another one is a selection filter. I want to change the result when one or both of them change. I use Rxjs combineLatest so when both of them or search input change, everything is ok, but when changing the Partner type at the first, the response does not change.
ngOnInit() {
super.ngOnInit();
this.getAllPartners();
combineLatest([this.searchPartnerFc.valueChanges, this.filterFc.valueChanges])
  .pipe(
    switchMap(([search, filter]) => {
      let partnersBySearch = this.getSearchResult(search);
      let partnersByFilter = this.getFilterResult(filter);
      this.partners = partnersBySearch.filter(item => partnersByFilter.indexOf(item) > 0);
      return this.partners;
    }),
  )
  .subscribe();
}
getFilterResult(filterKey: string) {
    if (filterKey == 'All') return this.allPartners;
    else return this.allPartners.filter(partner => partner.partnerType == filterKey);
}
getSearchResult(searchString: string) {
    return this.allPartners.filter(x => x.partnerName.toLowerCase().includes(searchString));
}
 
     
    