We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79dc5e4 commit c25859cCopy full SHA for c25859c
apps/client/src/utils/debouncer.ts
@@ -14,12 +14,15 @@ export default class Debouncer<T> {
14
15
updateValue(value: T) {
16
this.lastValue = value;
17
- this.destroy();
+ if (this.timeoutId !== null) {
18
+ clearTimeout(this.timeoutId);
19
+ }
20
this.timeoutId = setTimeout(this.reportUpdate.bind(this), this.debounceInterval);
21
}
22
23
destroy() {
24
if (this.timeoutId !== null) {
25
+ this.reportUpdate();
26
clearTimeout(this.timeoutId);
27
28
0 commit comments