на запрос. Если в запросе приходит ошибка, то потом этот valueChanges перестает обрабатываться, с чем связано?
                  
                  
                  Немного в отрыве от контекста, код выглядит так:
                  
                  
                  this.searchResults$ = this.customerCtrl.valueChanges.pipe(
                  
                  
                      startWith(''),
                  
                  
                      debounceTime(300),
                  
                  
                      filter(name => {
                  
                  
                          const res = typeof name === 'string';
                  
                  
                          if (!res) {
                  
                  
                              this.onChange(name);
                  
                  
                              this._onChangeNull = false;
                  
                  
                          } else {
                  
                  
                              if (!this._onChangeNull) {
                  
                  
                                  this.onChange(null);
                  
                  
                                  this._onChangeNull = true;
                  
                  
                              }
                  
                  
                          }
                  
                  
                          return res;
                  
                  
                      }),
                  
                  
                      tap(() => this.searching = true),
                  
                  
                      switchMap((name) => this.ds.readCustomers(0, 3, name ? new Filter({ name }) : null)),
                  
                  
                      tap(() => this.searching = false),
                  
                  
                      map(dp => sortBy(dp.data, 'name')),
                  
                  
                      catchError(error => {
                  
                  
                          this.searching = false;
                  
                  
                          return empty();
                  
                  
                      })
                  
                  
                  );
                  
                  
                
ошибка завершает всю цепочку обсервабл
Обсуждают сегодня