You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perceptron8
changed the title
Tree / TreeSelect: no initial selection for node with empty key
Tree / TreeSelect: no initial selection of node with empty key
Oct 4, 2024
Same instance (selection works fine):
<p-treeselectionMode="single" [value]="[root]" [selection]="root" />
Same key (selection doesn't work):
<p-treeselectionMode="single" [value]="[root]" [selection]="{key: root.key, label: root.label}" />
`
mertsincan
added
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Nov 18, 2024
Describe the bug
Initial selection breaks when node's key is empty string.
Reproducer
https://stackblitz.com/edit/tz94ei-dk7k5x?file=src%2Fapp%2Ftree-controlled-demo.html
PrimeNG version
17.18.11
Steps to reproduce the behavior
See reproducer
Expected behavior
Roots of both trees should be selected.
The text was updated successfully, but these errors were encountered: