Skip to content

Commit

Permalink
Fixed #13698 - TreeSelect | Update condition of onClick
Browse files Browse the repository at this point in the history
  • Loading branch information
cetincakiroglu committed Mar 13, 2024
1 parent f68a502 commit a352346
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/app/components/treeselect/treeselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,12 @@ export class TreeSelect implements AfterContentInit {
return;
}

if (!this.overlayViewChild?.el?.nativeElement?.contains(event.target) && !DomHandler.hasClass(event.target, 'p-treeselect-close')) {
if (
!this.overlayViewChild?.el?.nativeElement?.contains(event.target) &&
!DomHandler.hasClass(event.target, 'p-treeselect-close') &&
!DomHandler.hasClass(event.target, 'p-checkbox-box') &&
!DomHandler.hasClass(event.target, 'p-checkbox-icon')
) {
if (this.overlayVisible) {
this.hide();
} else {
Expand Down Expand Up @@ -857,7 +862,7 @@ export class TreeSelect implements AfterContentInit {
this.onNodeSelect.emit(event);

if (this.selectionMode === 'single') {
this.hide();
// this.hide();
this.focusInput?.nativeElement.focus();
}
}
Expand Down

0 comments on commit a352346

Please sign in to comment.