bouncetime

This commit is contained in:
Daniel Ponte 2025-02-04 21:06:40 -05:00
parent 04b0d0b5de
commit 9b8da819c6

View file

@ -115,7 +115,9 @@ export class CallsComponent {
subscriptions = new Subscription();
pageWindow = 0;
fetchCalls = new Subject<CallsListParams>();
fetchCalls = new BehaviorSubject<CallsListParams>(
this.buildParams(this.curPage, this.curPage.pageIndex),
);
constructor(
private callsSvc: CallsService,
@ -244,6 +246,7 @@ export class CallsComponent {
this.subscriptions.add(
this.fetchCalls
.pipe(
debounceTime(500),
switchMap((params) => {
console.log("gc switchmap");
return this.callsSvc.getCalls(params);