Skip to content
Snippets Groups Projects
Verified Commit 4826d1d0 authored by Sebastian Bergandy's avatar Sebastian Bergandy :keyboard:
Browse files

OZG-6185 remove debounce from resource service

parent aeaf25c9
Branches
Tags
1 merge request!68OZG-6185 fix versenden step
......@@ -24,35 +24,14 @@
import { HttpErrorResponse } from '@angular/common/http';
import { getUrl, hasLink, Resource, ResourceUri } from '@ngxp/rest';
import { isEqual, isNull } from 'lodash-es';
import {
BehaviorSubject,
catchError,
combineLatest,
debounceTime,
filter,
first,
map,
Observable,
of,
startWith,
tap,
throwError,
} from 'rxjs';
import { BehaviorSubject, catchError, combineLatest, filter, first, map, Observable, of, startWith, tap, throwError } from 'rxjs';
import { isUnprocessableEntity } from '../http.util';
import { HttpError } from '../tech.model';
import { isNotNull } from '../tech.util';
import { ResourceServiceConfig } from './resource.model';
import { ResourceRepository } from './resource.repository';
import { mapToFirst, mapToResource } from './resource.rxjs.operator';
import {
createEmptyStateResource,
createErrorStateResource,
createStateResource,
isInvalidResourceCombination,
isLoadingRequired,
isStateResoureStable,
StateResource,
} from './resource.util';
import { createEmptyStateResource, createErrorStateResource, createStateResource, isInvalidResourceCombination, isLoadingRequired, isStateResoureStable, StateResource, } from './resource.util';
/**
* B = Type of baseresource
......@@ -70,7 +49,6 @@ export abstract class ResourceService<B extends Resource, T extends Resource> {
public get(): Observable<StateResource<T>> {
return combineLatest([this.stateResource.asObservable(), this.getConfigResource()]).pipe(
debounceTime(50),
tap(([stateResource, configResource]) => this.handleResourceChanges(stateResource, configResource)),
filter(([stateResource]) => !isInvalidResourceCombination(stateResource, this.configResource)),
mapToFirst<T, B>(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment