Skip to content

Commit

Permalink
Merge pull request #15037 from primefaces/issue-13698
Browse files Browse the repository at this point in the history
Fixed #13698 - TreeSelect | Update condition of onClick
  • Loading branch information
cetincakiroglu authored Mar 13, 2024
2 parents f68a502 + a352346 commit e76ddb1
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 e76ddb1

Please sign in to comment.