items$: Observable<any> = this.catalog.fetchList().pipe(
                  
                  
                      takeUntil(this.alive$),
                  
                  
                      shareReplay(1),
                  
                  
                      switchMap(items => from(items)),
                  
                  
                      map(item => item.categories.map(category => ({...item, category}))),
                  
                  
                      mergeMap(items => from(items)),
                  
                  
                      groupBy(item => item.category),
                  
                  
                      mergeMap(group => group
                  
                  
                        .pipe(
                  
                  
                          toArray(),  // тут должна быть фильтрация из FormControl и emit на изменеия 
                  
                  
                          map(items => ({name: group.key, items}))
                  
                  
                        )
                  
                  
                      ),
                  
                  
                      toArray(),
                  
                  
                    );
                  
                  
                  может кто помочь?
                  
                  
                
map
Обсуждают сегодня