Skip to content

Commit

Permalink
revert cs click debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcetin01140 committed Jul 5, 2024
1 parent 3e16a8d commit 86da162
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/app/components/cascadeselect/cascadeselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}

Expand All @@ -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) {
Expand Down

0 comments on commit 86da162

Please sign in to comment.