Skip to content

Commit

Permalink
Merge pull request #15520 from robGardiner01/tree-select-focus
Browse files Browse the repository at this point in the history
FIX: p-tree - Node which is not selectable shouldn't have focus
  • Loading branch information
cetincakiroglu authored May 14, 2024
2 parents d6f887e + da1a7e5 commit 758b25d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/components/tree/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,10 @@ export class Tree implements OnInit, AfterContentInit, OnChanges, OnDestroy, Blo
return;
} else if (this.selectionMode) {
if (node.selectable === false) {
node.style = '--p-focus-ring-color: none;';
return;
} else {
node.style = '--p-focus-ring-color: var(--primary-color)';
}

if (this.hasFilteredNodes()) {
Expand Down

0 comments on commit 758b25d

Please sign in to comment.