From 9b8da819c697e1b86831fc8a6173075577970233 Mon Sep 17 00:00:00 2001 From: Daniel Ponte Date: Tue, 4 Feb 2025 21:06:40 -0500 Subject: [PATCH] bouncetime --- client/stillbox/src/app/calls/calls.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client/stillbox/src/app/calls/calls.component.ts b/client/stillbox/src/app/calls/calls.component.ts index 9e03243..dceda59 100644 --- a/client/stillbox/src/app/calls/calls.component.ts +++ b/client/stillbox/src/app/calls/calls.component.ts @@ -115,7 +115,9 @@ export class CallsComponent { subscriptions = new Subscription(); pageWindow = 0; - fetchCalls = new Subject(); + fetchCalls = new BehaviorSubject( + 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);