From 86da162eb2bf6c56ac6f1362fcfed5a495f69206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Fri, 5 Jul 2024 13:54:51 +0300 Subject: [PATCH] revert cs click debounce --- src/app/components/cascadeselect/cascadeselect.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/app/components/cascadeselect/cascadeselect.ts b/src/app/components/cascadeselect/cascadeselect.ts index 750ec88c622..3786a2ce95d 100755 --- a/src/app/components/cascadeselect/cascadeselect.ts +++ b/src/app/components/cascadeselect/cascadeselect.ts @@ -662,10 +662,6 @@ export class CascadeSelect implements OnInit, AfterContentInit { processedOptions: string[] | string | undefined = []; - containerClickTimeout: any = null; - - containerClickDebounceTime = 200; - get containerClass() { return { 'p-cascadeselect p-component p-inputwrapper': true, @@ -1089,7 +1085,7 @@ export class CascadeSelect implements OnInit, AfterContentInit { } onContainerClick(event: MouseEvent) { - if (this.disabled || this.loading || this.containerClickTimeout) { + if (this.disabled || this.loading) { return; } @@ -1102,14 +1098,6 @@ export class CascadeSelect implements OnInit, AfterContentInit { this.focusInputViewChild?.nativeElement.focus(); } - - this.containerClickTimeout = setTimeout(() => { - this.containerClickTimeout = null; - - if (document?.activeElement !== this.focusInputViewChild?.nativeElement) { - this.focusInputViewChild?.nativeElement.focus(); - } - }, this.containerClickDebounceTime); } isOptionMatched(processedOption) {